summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-boilerplate.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-19 15:04:02 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-19 15:10:59 +0200
commitf1fc04d58d90cc0edde82a2bdeaefffb7d4d6951 (patch)
treeb65c3e49123f3e2008d823bfd8f51e663b5ba1b8 /cmake/opentrack-boilerplate.cmake
parenteee2cffd96fa2d7312708768fac7e67f129c5970 (diff)
cmake: allow for build without install
For unfinished modules to avoid bit rot.
Diffstat (limited to 'cmake/opentrack-boilerplate.cmake')
-rw-r--r--cmake/opentrack-boilerplate.cmake16
1 files changed, 10 insertions, 6 deletions
diff --git a/cmake/opentrack-boilerplate.cmake b/cmake/opentrack-boilerplate.cmake
index 2e593138..4546de28 100644
--- a/cmake/opentrack-boilerplate.cmake
+++ b/cmake/opentrack-boilerplate.cmake
@@ -116,7 +116,7 @@ endfunction()
function(opentrack_boilerplate n)
message(STATUS "module ${n}")
cmake_parse_arguments(arg
- "STATIC;NO-COMPAT;BIN;EXECUTABLE;NO-QT;WIN32-CONSOLE"
+ "STATIC;NO-COMPAT;BIN;EXECUTABLE;NO-QT;WIN32-CONSOLE;NO-INSTALL"
"LINK;COMPILE"
"SOURCES"
${ARGN}
@@ -169,7 +169,9 @@ function(opentrack_boilerplate n)
target_link_libraries(${n} opentrack-api opentrack-options opentrack-compat)
endif()
- opentrack_install_sources(${n})
+ if(NOT arg_NO-INSTALL)
+ opentrack_install_sources(${n})
+ endif()
opentrack_compat(${n})
if(CMAKE_COMPILER_IS_GNUCXX)
@@ -192,10 +194,12 @@ function(opentrack_boilerplate n)
string(REPLACE "-" "_" n_ ${n_})
target_compile_definitions(${n} PRIVATE "BUILD_${n_}")
- if(arg_BIN AND WIN32)
- install(TARGETS ${n} RUNTIME DESTINATION . LIBRARY DESTINATION .)
- else()
- install(TARGETS ${n} ${opentrack-hier-str})
+ if(NOT arg_NO-INSTALL)
+ if(arg_BIN AND WIN32)
+ install(TARGETS ${n} RUNTIME DESTINATION . LIBRARY DESTINATION .)
+ else()
+ install(TARGETS ${n} ${opentrack-hier-str})
+ endif()
endif()
endif()
endfunction()