From 53fc047667e6e7cf71be13504e003a074b6a83bf Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 13:20:35 +0100 Subject: gui: hidden symbol visibility by default --- gui/CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 158804c2..7fec9a15 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -39,4 +39,16 @@ if(LINUX) target_link_libraries(opentrack procps) endif() +set(c-props) +set(l-props) +if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE) + set(c-props "-fvisibility=hidden -fvisibility-inlines-hidden") + set(l-props "-Wl,--as-needed") +endif() + +set_target_properties(opentrack PROPERTIES + LINK_FLAGS "${l-props}" + COMPILE_FLAGS "${c-props}" +) + install(TARGETS opentrack DESTINATION .) -- cgit v1.2.3