Update CMake rules

+ Add WITH_GCC_VISIBILITY option
+ Use common tde_setup_gcc_visibility
+ Add TestBigEndian and tde_setup_largefiles

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 6 years ago
parent 74a23fb6b0
commit b0c2717fd8
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1,6 +1,6 @@
################################################# #################################################
# #
# (C) 2015 Slávek Banko # (C) 2015-2019 Slávek Banko
# slavek (DOT) banko (AT) axis.cz # slavek (DOT) banko (AT) axis.cz
# #
# Improvements and feedback are welcome # Improvements and feedback are welcome
@ -24,6 +24,7 @@ set( VERSION 2.0.2 )
include( FindPkgConfig ) include( FindPkgConfig )
include( CheckCXXSourceCompiles ) include( CheckCXXSourceCompiles )
include( CheckFunctionExists ) include( CheckFunctionExists )
include( CheckSymbolExists )
include( CheckIncludeFile ) include( CheckIncludeFile )
include( CheckLibraryExists ) include( CheckLibraryExists )
@ -32,7 +33,6 @@ include( CheckLibraryExists )
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros ) include( TDEMacros )
tde_setup_architecture_flags( )
##### setup install paths ####################### ##### setup install paths #######################
@ -45,6 +45,7 @@ tde_setup_paths( )
option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
OPTION( WITH_LIBLTDL "Build with libltdl" ${WITH_ALL_OPTIONS} ) OPTION( WITH_LIBLTDL "Build with libltdl" ${WITH_ALL_OPTIONS} )
OPTION( WITH_ALSA_SINK "Build with alsa sink" ${WITH_ALL_OPTIONS} ) OPTION( WITH_ALSA_SINK "Build with alsa sink" ${WITH_ALL_OPTIONS} )

@ -10,6 +10,20 @@
################################################# #################################################
# required stuff
tde_setup_architecture_flags( )
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
tde_setup_largefiles( )
if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( )
endif( )
##### check for system libraries ################ ##### check for system libraries ################
if( WITH_LIBLTDL ) if( WITH_LIBLTDL )

@ -15,10 +15,6 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
) )
if( UNIX )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden" )
set( __KDE_HAVE_GCC_VISIBILITY 1 )
endif( UNIX )
configure_file( akode_export.h.cmake akode_export.h @ONLY ) configure_file( akode_export.h.cmake akode_export.h @ONLY )

Loading…
Cancel
Save