diff options
-rw-r--r-- | gui/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
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 .) |