summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3363f14e..1f0685ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -104,13 +104,17 @@ function(opentrack_compat target)
endfunction()
macro(opentrack_library n dir)
- cmake_parse_arguments(foolib "" "LINK;COMPILE;GNU-LINK;GNU-COMPILE" "" ${ARGN})
+ cmake_parse_arguments(foolib "" "LINK;COMPILE;GNU-LINK;GNU-COMPILE;STATIC" "" ${ARGN})
if(NOT " ${foolib_UNPARSED_ARGUMENTS}" STREQUAL " ")
message(FATAL_ERROR "opentrack_library bad formals")
endif()
opentrack_module(${n} ${dir})
opentrack_qt(${n})
- add_library(${n} SHARED ${${n}-all})
+ set(link-mode SHARED)
+ if (foolib_STATIC)
+ set(link-mode STATIC)
+ endif()
+ add_library(${n} ${link-mode} ${${n}-all})
target_link_libraries(${n} opentrack-api ${MY_QT_LIBS})
if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(${n} PROPERTIES