Use common CMake tests.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/2/head
Slávek Banko 6 years ago
parent d850bde08b
commit b5da70f352
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -17,8 +17,10 @@ include( CheckCSourceRuns )
include( CheckCXXSourceCompiles )
include( CheckLibraryExists )
include( CheckFunctionExists )
include( CheckSymbolExists )
include( CheckStructHasMember )
##### include our cmake modules #################
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
@ -30,6 +32,7 @@ include( TDEMacros )
include( TDESetupPaths )
tde_setup_paths( )
##### set PKG_CONFIG_PATH #######################
set( ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}:${LIB_INSTALL_DIR}/pkgconfig" )
@ -50,6 +53,7 @@ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
INCLUDE (UsePkgConfig)
# Find GTK
@ -70,33 +74,6 @@ ELSE (NOT BONOBO_INCLUDE_DIR)
SET(BONOBO_DEFINITIONS -D HAVE_BONOBO)
ENDIF (NOT BONOBO_INCLUDE_DIR)
# Find msgfmt
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
FIND_PACKAGE(Msgfmt REQUIRED)
# Find xgettext
FIND_PROGRAM(
XGETTEXT_PATH
NAMES "xgettext"
PATHS "/usr/bin"
)
IF(${XGETTEXT_PATH} STREQUAL "XGETTEXT_PATH-NOTFOUND")
MESSAGE(STATUS "xgettext not found. You will not be able to run 'make extract_messages' in the 'po' directory.")
ELSE(${XGETTEXT_PATH} STREQUAL "XGETTEXT_PATH-NOTFOUND")
MESSAGE(STATUS "Found xgettext: ${XGETTEXT_PATH}")
ENDIF(${XGETTEXT_PATH} STREQUAL "XGETTEXT_PATH-NOTFOUND")
# Find extractrc
FIND_PROGRAM(
EXTRACTRC_PATH
NAMES "extractrc"
PATHS "/usr/bin"
)
IF(${EXTRACTRC_PATH} STREQUAL "EXTRACTRC_PATH-NOTFOUND")
MESSAGE(STATUS "extractrc not found. You will not be able to run 'make extract_messages' in the 'po' directory.")
ELSE(${EXTRACTRC_PATH} STREQUAL "EXTRACTRC_PATH-NOTFOUND")
MESSAGE(STATUS "Found extractrc: ${EXTRACTRC_PATH}")
ENDIF(${EXTRACTRC_PATH} STREQUAL "EXTRACTRC_PATH-NOTFOUND")
# Work out where to install stuff
EXEC_PROGRAM(

@ -1,17 +1,19 @@
##### check for gcc visibility support #########
# FIXME
# This should check for [T]Qt3 visibility support
if( WITH_GCC_VISIBILITY )
if( NOT UNIX )
tde_message_fatal(FATAL_ERROR "\ngcc visibility support was requested, but your system is not *NIX" )
endif( NOT UNIX )
set( __KDE_HAVE_GCC_VISIBILITY 1 )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
endif( )
# required stuff
tde_setup_architecture_flags( )
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
tde_setup_largefiles( )
# required stuff
find_package( TQt )
find_package( TDE )
##### check for gcc visibility support #########
if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( )
endif( )

Loading…
Cancel
Save