Browse Source

Use common CMake tests.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
master
Slávek Banko 3 months ago
parent
commit
27a08b92d0
Signed by: Slávek Banko <slavek.banko@axis.cz> GPG Key ID: 608F5293A04BE668
2 changed files with 18 additions and 24 deletions
  1. 2
    1
      CMakeLists.txt
  2. 16
    23
      ConfigureChecks.cmake

+ 2
- 1
CMakeLists.txt View File

@@ -19,8 +19,9 @@ project( tdepowersave )
19 19
 
20 20
 ##### include essential cmake modules ###########
21 21
 
22
-include( CheckCXXSourceCompiles )
23 22
 include( FindPkgConfig )
23
+include( CheckSymbolExists )
24
+include( CheckCXXSourceCompiles )
24 25
 
25 26
 
26 27
 ##### include our cmake modules #################

+ 16
- 23
ConfigureChecks.cmake View File

@@ -9,18 +9,24 @@
9 9
 #
10 10
 #################################################
11 11
 
12
-##### check for gcc visibility support #########
13
-# FIXME
14
-# This should check for [T]Qt3 visibility support
12
+
13
+# required stuff
14
+find_package( TQt )
15
+find_package( TDE )
16
+
17
+tde_setup_architecture_flags( )
18
+
19
+include(TestBigEndian)
20
+test_big_endian(WORDS_BIGENDIAN)
21
+
22
+tde_setup_largefiles( )
23
+
24
+
25
+##### check for gcc visibility support
15 26
 
16 27
 if( WITH_GCC_VISIBILITY )
17
-  if( NOT UNIX )
18
-    tde_message_fatal(FATAL_ERROR "\ngcc visibility support was requested, but your system is not *NIX" )
19
-  endif( NOT UNIX )
20
-  set( __KDE_HAVE_GCC_VISIBILITY 1 )
21
-  set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
22
-  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
23
-endif( )
28
+  tde_setup_gcc_visibility( )
29
+endif( WITH_GCC_VISIBILITY )
24 30
 
25 31
 
26 32
 # check for Xext
@@ -56,16 +62,3 @@ pkg_search_module( DBUS_TQT dbus-1-tqt )
56 62
 if( NOT DBUS_TQT_FOUND )
57 63
   tde_message_fatal( "dbus-1-tqt is required, but was not found on your system" )
58 64
 endif( )
59
-
60
-# check for msgfmt
61
-if( BUILD_TRANSLATIONS AND NOT DEFINED MSGFMT_EXECUTABLE )
62
-  find_program( MSGFMT_EXECUTABLE msgfmt )
63
-  if( NOT MSGFMT_EXECUTABLE )
64
-    tde_message_fatal( "msgfmt program is required, but was not found on your system" )
65
-  endif( )
66
-endif( )
67
-
68
-
69
-# required stuff
70
-find_package( TQt )
71
-find_package( TDE )

Loading…
Cancel
Save