summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-02-10 16:49:55 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-02-10 16:49:55 +0100
commitb5da70f35248145bf66d137470952bcab9e16494 (patch)
treebd9cbd7118d30a8d24a87de787effe7d572e68a4
parentd850bde08bc3139b9aec0ff80c8ac0126dda8cc9 (diff)
downloadgtk-qt-engine-b5da70f35248145bf66d137470952bcab9e16494.tar.gz
gtk-qt-engine-b5da70f35248145bf66d137470952bcab9e16494.zip
Use common CMake tests.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--CMakeLists.txt31
-rw-r--r--ConfigureChecks.cmake26
2 files changed, 18 insertions, 39 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9811d94..4a11ebe 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( )