From: rcombs Date: Thu, 4 Dec 2014 05:35:40 +0000 (-0500) Subject: fix visibility for extras (i hope) X-Git-Tag: 3.0.0-233~1111^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d03f7c29f902b9f35a40f85dfb726bbf3e7d7b97;p=thirdparty%2Fsnort3.git fix visibility for extras (i hope) --- diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index 6ad44abcc..492a18545 100644 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -38,8 +38,15 @@ else (BUILD_EXTRA_PLUGINS) message(STATUS "${CMAKE_CXX_FLAGS}") - # Some shared library flags for the two platforms which I am using include(CheckCXXCompilerFlag) + set (CMAKE_REQUIRED_FLAGS "-fvisibility=hidden") + check_cxx_compiler_flag ("" HAVE_VISIBILITY) + if (HAVE_VISIBILITY) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DHAVE_VISIBILITY") + endif () + unset(CMAKE_REQUIRED_FLAGS) + + # Some shared library flags for the two platforms which I am using set(CMAKE_REQUIRED_FLAGS "-Wl,-undefined,dynamic_lookup") check_cxx_compiler_flag("" HAVE_DYNAMIC_LOOKUP) if(HAVE_DYNAMIC_LOOKUP)