summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-01-09 01:11:38 -0600
committerTimothy Pearson <[email protected]>2012-01-09 01:11:38 -0600
commit7508eafbec2436de2d49d4e93d8f4030ec48aa1f (patch)
tree157847d4298d91981e40465ed4fb2f426bf1a760 /CMakeLists.txt
parentb911168351033cde8e3b524060722e0001c27bda (diff)
downloadtdelibs-7508eafbec2436de2d49d4e93d8f4030ec48aa1f.tar.gz
tdelibs-7508eafbec2436de2d49d4e93d8f4030ec48aa1f.zip
Add gcc visibility option to tdelibs
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 420eed83d..e26c252ce 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,6 +77,7 @@ OPTION( WITH_UTEMPTER "Use utempter for utmp management" OFF )
OPTION( WITH_AVAHI "Enable AVAHI support" OFF )
OPTION( WITH_ELFICON "Enable ELF embedded icon support" OFF )
OPTION( WITH_PCRE "Enable pcre regex support for kjs" ON )
+OPTION( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" OFF )
OPTION( WITH_ASPELL "Enable aspell support" OFF )
OPTION( WITH_HSPELL "Enable hspell support" OFF )
@@ -747,6 +748,21 @@ if( WITH_PCRE )
set( HAVE_PCREPOSIX 1 )
endif( )
+
+##### check for gcc visibility support #########
+# FIXME
+# This should check for [T]Qt3 visibility support
+
+if( WITH_GCC_VISIBILITY )
+ if( NOT UNIX )
+ message(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( )
+
+
##### check for aspell ##########################
# we need ASPELL_DATADIR too