summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-19 16:38:43 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-19 16:38:43 +0200
commita8165591d993a23ae71ea4e5bb7df7596688ef7b (patch)
tree50c41a4eb746135126eab95808cdf0c0d767b9c1 /CMakeLists.txt
parentffefa511b474ed594a6a5bf5589aeae028f0bed2 (diff)
reduce diff to trackhat
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