summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-06-16 10:05:44 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-06-16 10:05:44 +0200
commitfab2afe75c7ab809d810ab6a7b263801a0dc1f1a (patch)
treef902dddd34d3610dc65702867f620085170f4d1e /CMakeLists.txt
parente4e564d4b8c43986e925996aca8cf10c6b30136e (diff)
trackhat: more stubs
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 10 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4413f712..65d6e369 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,7 +23,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-find_package(OpenCV 3.0)
+find_package(OpenCV 3.0 REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Core Xml Network Widgets Gui QUIET)
find_package(Qt5 COMPONENTS SerialPort QUIET)
@@ -83,13 +83,17 @@ macro(opentrack_qt n)
endmacro()
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 (STATIC)
+ set(link-mode STATIC)
+ endif()
+ add_library(${n} ${link-mode} ${${n}-all})
target_link_libraries(${n} ${MY_QT_LIBS})
if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(${n} PROPERTIES
@@ -99,7 +103,9 @@ macro(opentrack_library n dir)
else()
set_target_properties(${n} PROPERTIES LINK_FLAGS ${foolib_LINK} COMPILE_FLAGS ${foolib_COMPILE})
endif()
- install(TARGETS ${n} RUNTIME DESTINATION . LIBRARY DESTINATION .)
+ if (NOT STATIC)
+ install(TARGETS ${n} RUNTIME DESTINATION . LIBRARY DESTINATION .)
+ endif()
endmacro()
function(link_with_dinput8 n)