summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-10-18 14:17:52 +0200
committerSlávek Banko <slavek.banko@axis.cz>2014-10-18 14:29:21 +0200
commit69da674b30d246f4df152501b9312518cd900372 (patch)
tree3615d1453adac19ad0162ce2aceae7e842b21856 /ConfigureChecks.cmake
parente22eb72fdd5085bce12a47b3707347c60d1e3268 (diff)
downloadtdebase-69da674b30d246f4df152501b9312518cd900372.tar.gz
tdebase-69da674b30d246f4df152501b9312518cd900372.zip
Fix gcc visibility detection
This resolves Bug 1832 Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake26
1 files changed, 18 insertions, 8 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 6a3c001da..1980d3ce0 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -12,7 +12,10 @@
#
#################################################
+# required stuff
tde_setup_architecture_flags( )
+find_package( TQt )
+find_package( TDE )
##### check for libdl ###########################
@@ -90,8 +93,21 @@ endif( )
if( WITH_GCC_VISIBILITY )
if( NOT UNIX )
- tde_message_fatal(FATAL_ERROR "\ngcc visibility support was requested, but your system is not *NIX" )
+ tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" )
endif( NOT UNIX )
+ tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" )
+ check_cxx_source_compiles( "
+ #include <kdemacros.h>
+ #ifndef __KDE_HAVE_GCC_VISIBILITY
+ #error gcc visibility is not enabled in tdelibs
+ #endif
+ int main() { return 0; } "
+ HAVE_GCC_VISIBILITY
+ )
+ tde_restore( CMAKE_REQUIRED_INCLUDES )
+ if( NOT HAVE_GCC_VISIBILITY )
+ tde_message_fatal( "gcc visibility support was requested, but not supported in tdelibs" )
+ endif( NOT HAVE_GCC_VISIBILITY )
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")
@@ -334,8 +350,8 @@ else( )
set( WITHOUT_ARTS 1 )
endif( )
-# libart
+# libart
if( WITH_LIBART )
pkg_search_module( LIBART libart-2.0 )
if( NOT LIBART_FOUND )
@@ -345,12 +361,6 @@ if( WITH_LIBART )
endif( WITH_LIBART )
-# required stuff
-find_package( TQt )
-find_package( TDE )
-
-
-
# dbus (tdm, kdesktop, twin/compton-tde.c)
if( BUILD_TDM OR BUILD_KDESKTOP OR (BUILD_TWIN AND WITH_XCOMPOSITE) )