summaryrefslogtreecommitdiffhomepage
path: root/gui/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'gui/CMakeLists.txt')
-rw-r--r--gui/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index f56641fb..778cbf08 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -41,4 +41,18 @@ if(LINUX)
target_link_libraries(opentrack procps)
endif()
+set(c-props)
+set(l-props)
+if(CMAKE_COMPILER_IS_GNUCXX)
+ set(c-props "-fvisibility=hidden -fvisibility-inlines-hidden")
+ if(NOT APPLE)
+ set(l-props "-Wl,--as-needed")
+ endif()
+endif()
+
+set_target_properties(opentrack PROPERTIES
+ LINK_FLAGS "${l-props}"
+ COMPILE_FLAGS "${c-props}"
+)
+
install(TARGETS opentrack DESTINATION .)