diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-19 16:38:43 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-19 16:38:43 +0200 |
commit | a8165591d993a23ae71ea4e5bb7df7596688ef7b (patch) | |
tree | 50c41a4eb746135126eab95808cdf0c0d767b9c1 | |
parent | ffefa511b474ed594a6a5bf5589aeae028f0bed2 (diff) |
reduce diff to trackhat
-rw-r--r-- | CMakeLists.txt | 8 |
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 |