Browse Source

Use common GCC visibility test.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Slávek Banko 2 months ago
parent
commit
9a394bb261
Signed by: Slávek Banko <slavek.banko@axis.cz> GPG Key ID: 608F5293A04BE668
1 changed files with 1 additions and 21 deletions
  1. 1
    21
      ConfigureChecks.cmake

+ 1
- 21
ConfigureChecks.cmake View File

@@ -128,29 +128,9 @@ endif( )
128 128
 
129 129
 
130 130
 ##### check for gcc visibility support #########
131
-# FIXME
132
-# This should check for [T]Qt3 visibility support
133 131
 
134 132
 if( WITH_GCC_VISIBILITY )
135
-  if( NOT UNIX )
136
-    tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" )
137
-  endif( NOT UNIX )
138
-  tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" )
139
-  check_cxx_source_compiles( "
140
-    #include <kdemacros.h>
141
-      #ifndef __KDE_HAVE_GCC_VISIBILITY
142
-      #error gcc visibility is not enabled in tdelibs
143
-      #endif
144
-      int main() { return 0; } "
145
-    HAVE_GCC_VISIBILITY
146
-  )
147
-  tde_restore( CMAKE_REQUIRED_INCLUDES )
148
-  if( NOT HAVE_GCC_VISIBILITY )
149
-    tde_message_fatal( "gcc visibility support was requested, but not supported in tdelibs" )
150
-  endif( NOT HAVE_GCC_VISIBILITY )
151
-  set( __KDE_HAVE_GCC_VISIBILITY 1 )
152
-  set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
153
-  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
133
+  tde_setup_gcc_visibility( )
154 134
 endif( )
155 135
 
156 136
 

Loading…
Cancel
Save