Add gcc visibility option to tdelibs

pull/16/head
Timothy Pearson 13 years ago
parent b911168351
commit 7508eafbec

@ -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

@ -113,6 +113,9 @@
/* Defined if you have elficon support. */
#cmakedefine HAVE_ELFICON 1
/* Defined if you have fvisibility and fvisibility-inlines-hidden support. */
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/* Define is posix_fadvise is supported */
#undef HAVE_FADVISE

Loading…
Cancel
Save