summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-13 07:42:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-13 07:42:29 +0100
commit53e8b2d41988be69deb800e1ef3cbcfc699a3076 (patch)
treedc5a3a9098bf4172a52f0410a04274b997505ff0 /CMakeLists.txt
parentb0657c7ca495ac9d1d3938b3fdfddd9a8ed2d5f2 (diff)
cmake, main: work toward introducing alternative UI
We're going to base opentrack derivatives on the same branch. Previously merges were a living hell. Modularizing the UI code and having continuously-built executables will do a lot. First opentrack variant in progress is a TrackHat device for mouse and scrolling control for people with spine and hand/arm disabilities.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt38
1 files changed, 14 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f47bdd03..aa1a63dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,7 @@ include(opentrack-boilerplate)
include(opentrack-qt)
include(opentrack-version)
include(opentrack-install)
+include(opentrack-variant)
if(WIN32)
enable_language(RC)
@@ -57,31 +58,20 @@ add_custom_target(mrproper COMMAND
"${CMAKE_SOURCE_DIR}/cmake/opentrack-clean-build-directory.cmake"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
-otr_add_target_dirs(opentrack-subprojects
- "tracker-*"
- "proto-*"
- "filter-*"
- "ext-*"
- "options"
- "api"
- "compat"
- "logic"
- "dinput"
- "gui"
- "main"
- "x-plane-plugin"
- "csv"
- "pose-widget"
- "spline"
- "qxt-mini"
- "macosx"
- "cv"
- "migration")
+function(otr_add_subdirs)
+ otr_dist_select_variant()
+ get_property(_globs GLOBAL PROPERTY opentrack-subprojects)
+ otr_add_target_dirs(_globbed ${_globs})
-foreach(k ${opentrack-subprojects})
- get_filename_component(k "${k}" DIRECTORY)
- add_subdirectory("${k}")
-endforeach()
+ get_property(_variant GLOBAL PROPERTY opentrack-variant)
+ add_subdirectory("variant/${_variant}")
+ foreach(k ${_globbed})
+ get_filename_component(k "${k}" DIRECTORY)
+ add_subdirectory("${k}")
+ endforeach()
+endfunction()
+
+otr_add_subdirs()
otr_merge_translations()
install_sources()