summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2019-01-29 21:07:35 +0100
committerSlávek Banko <[email protected]>2019-01-29 21:07:59 +0100
commitdb202a0c5d426040b320ddf8ecfcfcff74c1c661 (patch)
treea0f83bb7541ae11267a3cd77b04029ab51cee5a5
parent6fd672a1998714a51e21f705ad5cd28f045504d3 (diff)
downloadavahi-tqt-db202a0c5d426040b320ddf8ecfcfcff74c1c661.tar.gz
avahi-tqt-db202a0c5d426040b320ddf8ecfcfcff74c1c661.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 <[email protected]> (cherry picked from commit e05788fc201a831ddb782ba48aa530c059f1646f)
-rw-r--r--CMakeLists.txt26
-rw-r--r--avahi-tqt/qt-watch.h2
2 files changed, 22 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d2e5745..d77d4e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,6 +21,7 @@ set( PACKAGE_VERSION 0.6.30 )
##### include essential cmake modules ###########
+include( CheckSymbolExists )
include( FindPkgConfig )
@@ -28,7 +29,6 @@ include( FindPkgConfig )
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
-tde_setup_architecture_flags( )
##### setup install paths #######################
@@ -37,6 +37,22 @@ include( TDESetupPaths )
tde_setup_paths( )
+##### optional stuff
+
+option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
+option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
+
+
+##### setup architecture flags ##################
+
+tde_setup_architecture_flags( )
+
+include(TestBigEndian)
+test_big_endian(WORDS_BIGENDIAN)
+
+tde_setup_largefiles( )
+
+
##### configure checks ##########################
find_package( TQt )
@@ -53,10 +69,10 @@ if( NOT AVAHI_COMMON )
endif( )
message( STATUS " found ${AVAHI_COMMON}" )
-if( UNIX )
- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden" )
- add_definitions( -DHAVE_VISIBILITY_HIDDEN )
-endif( UNIX )
+if( WITH_GCC_VISIBILITY )
+ tde_setup_gcc_visibility( )
+ add_definitions( -D__KDE_HAVE_GCC_VISIBILITY )
+endif( )
#### pkg-config #################################
diff --git a/avahi-tqt/qt-watch.h b/avahi-tqt/qt-watch.h
index 01886b3..1d26303 100644
--- a/avahi-tqt/qt-watch.h
+++ b/avahi-tqt/qt-watch.h
@@ -28,7 +28,7 @@ AVAHI_C_DECL_BEGIN
/** Setup abstract poll structure for integration with TQt main loop */
const AvahiPoll* avahi_qt_poll_get(void)
-#ifdef HAVE_VISIBILITY_HIDDEN
+#ifdef __KDE_HAVE_GCC_VISIBILITY
__attribute__ ((visibility("default")))
#endif
;