#4 Fix GCC visibility, use common tests in CMake rules

Merged
SlavekB merged 2 commits from feat/cmakeCommonTests into master 4 months ago

+ 11
- 0
CMakeLists.txt View File

@@ -18,9 +18,20 @@ cmake_minimum_required( VERSION 2.8 )
18 18
 
19 19
 include( FindPkgConfig )
20 20
 include( CheckCXXSourceCompiles )
21
+include( CheckSymbolExists )
21 22
 
22 23
 set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
23 24
 include( TDEMacros )
25
+
26
+
27
+##### optional stuff
28
+
29
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
30
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
31
+
32
+
33
+##### configure checks ##########################
34
+
24 35
 include( ConfigureChecks.cmake )
25 36
 
26 37
 

+ 15
- 0
ConfigureChecks.cmake View File

@@ -9,6 +9,16 @@
9 9
 #
10 10
 #################################################
11 11
 
12
+##### setup architecture flags ##################
13
+
14
+tde_setup_architecture_flags( )
15
+
16
+include(TestBigEndian)
17
+test_big_endian(WORDS_BIGENDIAN)
18
+
19
+tde_setup_largefiles( )
20
+
21
+
12 22
 # dbus-1
13 23
 pkg_search_module( DBUS dbus-1 )
14 24
 if( NOT DBUS_FOUND )
@@ -17,3 +27,8 @@ endif( )
17 27
 
18 28
 # tqt
19 29
 find_package( TQt )
30
+
31
+# gcc visibility
32
+if( WITH_GCC_VISIBILITY )
33
+  tde_setup_gcc_visibility( )
34
+endif( )

+ 2
- 1
tqdbusobjectpath.h View File

@@ -25,6 +25,7 @@
25 25
 #define TQDBUSOBJECTPATH_H
26 26
 
27 27
 #include <tqcstring.h>
28
+#include "tqdbusmacros.h"
28 29
 
29 30
 /**
30 31
  * @brief Class for representing D-Bus object paths
@@ -35,7 +36,7 @@
35 36
  *
36 37
  * @see @ref dbusconventions-objectpath
37 38
  */
38
-class TQT_DBusObjectPath : public TQCString
39
+class TQDBUS_EXPORT TQT_DBusObjectPath : public TQCString
39 40
 {
40 41
 public:
41 42
     /**

+ 2
- 1
tqdbusunixfd.h View File

@@ -28,6 +28,7 @@
28 28
 #ifndef QT_H
29 29
 #include "ntqshared.h"
30 30
 #endif // QT_H
31
+#include "tqdbusmacros.h"
31 32
 
32 33
 
33 34
 #ifndef DBUS_TYPE_UNIX_FD
@@ -47,7 +48,7 @@
47 48
  *
48 49
  * @see @ref dbusconventions-unixfd
49 50
  */
50
-class TQT_DBusUnixFd
51
+class TQDBUS_EXPORT TQT_DBusUnixFd
51 52
 {
52 53
 public:
53 54
     /**

Loading…
Cancel
Save