From 5e2efcc212cf7e28af6702467f74528bb50de577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 10 Feb 2019 16:49:55 +0100 Subject: [PATCH] Use common CMake tests. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit b5da70f35248145bf66d137470952bcab9e16494) --- CMakeLists.txt | 31 ++++--------------------------- ConfigureChecks.cmake | 26 ++++++++++++++------------ 2 files changed, 18 insertions(+), 39 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 947a797..173c8fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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( diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 12e2eb1..c9ca45a 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -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( )