@ -1708,6 +1708,55 @@ macro( tde_setup_architecture_flags )
endmacro ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # #
# # # # # t d e _ s e t u p _ g c c _ v i s i b i l i t y
macro ( tde_setup_gcc_visibility )
if ( NOT DEFINED __KDE_HAVE_GCC_VISIBILITY )
if ( NOT UNIX )
tde_message_fatal ( "gcc visibility support was requested, but your system is not *NIX" )
endif ( NOT UNIX )
find_library ( TQT_LIBFILE qt-mt HINTS "${TQT_LIBRARY_DIRS}" )
if ( NOT "${TQT_LIBFILE}" STREQUAL "TQT_LIBFILE-NOTFOUND" )
message ( STATUS "Performing Test HAVE_TQT_VISIBILITY" )
execute_process (
C O M M A N D r e a d e l f - - s y m s " $ { T Q T _ L I B F I L E } "
O U T P U T _ V A R I A B L E H A V E _ T Q T _ V I S I B I L I T Y
)
if ( "${HAVE_TQT_VISIBILITY}" STREQUAL "" OR
" $ { H A V E _ T Q T _ V I S I B I L I T Y } " M A T C H E S " D E F A U L T [ ^ \ n ] * Q S e t t i n g s P r i v a t e " )
message ( STATUS "Performing Test HAVE_TQT_VISIBILITY - Failed" )
tde_message_fatal ( "gcc visibility support was requested, but not supported in qt library" )
endif ( )
message ( STATUS "Performing Test HAVE_TQT_VISIBILITY - Success" )
endif ( )
find_file ( TDEMACROS_H kdemacros.h HINTS "${TDE_INCLUDE_DIR}" )
if ( NOT "${TDEMACROS_H}" STREQUAL "TDEMACROS_H-NOTFOUND" )
tde_save_and_set ( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" )
check_cxx_source_compiles ( "
# i n c l u d e < k d e m a c r o s . h >
# i f n d e f _ _ K D E _ H A V E _ G C C _ V I S I B I L I T Y
# e r r o r g c c v i s i b i l i t y i s n o t e n a b l e d i n t d e l i b s
# e n d i f
i n t main ( ) { r e t u r n 0 ; } "
H A V E _ T D E _ V I S I B I L I T Y
)
tde_restore ( CMAKE_REQUIRED_INCLUDES )
if ( NOT HAVE_TDE_VISIBILITY )
tde_message_fatal ( "gcc visibility support was requested, but not supported in tdelibs" )
endif ( NOT HAVE_TDE_VISIBILITY )
endif ( )
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 ( )
endmacro ( )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # #
# # # # # R e s t o r e C M P 0 0 2 6 p o l i c y