diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-01-29 12:40:35 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-02-02 16:21:11 +0100 |
commit | 6d204a8b27c582bd12c5bc40ef58bc56342a7f95 (patch) | |
tree | bab19c2a9854c49ef7f601660b59ac7b5e7297c0 | |
parent | 06424528d6865915ba88043c79c7a01266fdaf96 (diff) | |
download | akode-6d204a8b27c582bd12c5bc40ef58bc56342a7f95.tar.gz akode-6d204a8b27c582bd12c5bc40ef58bc56342a7f95.zip |
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>
(cherry picked from commit b0c2717fd80109aa418e75298d66b6053fc6666e)
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | ConfigureChecks.cmake | 14 | ||||
-rw-r--r-- | akode/lib/CMakeLists.txt | 4 |
3 files changed, 17 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index df5b7ea..7e11399 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ ################################################# # -# (C) 2015 Slávek Banko +# (C) 2015-2019 Slávek Banko # slavek (DOT) banko (AT) axis.cz # # Improvements and feedback are welcome @@ -24,6 +24,7 @@ set( VERSION 2.0.2 ) include( FindPkgConfig ) include( CheckCXXSourceCompiles ) include( CheckFunctionExists ) +include( CheckSymbolExists ) include( CheckIncludeFile ) include( CheckLibraryExists ) @@ -32,7 +33,6 @@ include( CheckLibraryExists ) set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) include( TDEMacros ) -tde_setup_architecture_flags( ) ##### setup install paths ####################### @@ -45,6 +45,7 @@ tde_setup_paths( ) option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" OFF ) OPTION( WITH_LIBLTDL "Build with libltdl" ${WITH_ALL_OPTIONS} ) OPTION( WITH_ALSA_SINK "Build with alsa sink" ${WITH_ALL_OPTIONS} ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 743aa72..ea07330 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -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 ################ if( WITH_LIBLTDL ) diff --git a/akode/lib/CMakeLists.txt b/akode/lib/CMakeLists.txt index 9ecb472..2f61fa1 100644 --- a/akode/lib/CMakeLists.txt +++ b/akode/lib/CMakeLists.txt @@ -15,10 +15,6 @@ include_directories( ${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 ) |