diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-28 13:40:33 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-28 13:44:59 +0100 |
commit | 47d4b25bd0583b1fd65ae885950efd34c9df256b (patch) | |
tree | f3a155717092c436e9211e1dc244edc9c9d62fa9 /cmake | |
parent | 79d56147198dc873e30ae0ca8d554d37106db56f (diff) |
cmake: move around variant directories
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/opentrack-variant.cmake | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cmake/opentrack-variant.cmake b/cmake/opentrack-variant.cmake index 3ea01eaa..2cf39fcd 100644 --- a/cmake/opentrack-variant.cmake +++ b/cmake/opentrack-variant.cmake @@ -7,17 +7,17 @@ function(otr_dist_select_variant) foreach(k ${variants}) get_filename_component(name "${k}" NAME) - if(EXISTS "${k}/_variant.cmake" AND EXISTS "${k}/CMakeLists.txt") + if(EXISTS "${k}/_variant.cmake") list(APPEND variant-list "${name}") else() - message(FATAL_ERROR "Stray item in variant dir '${name}'") + message(FATAL_ERROR "stray variant dir '${name}'") endif() endforeach() set(opentrack_variant "default" CACHE STRING "") set(dir "${CMAKE_SOURCE_DIR}/variant/${opentrack_variant}") - if(NOT EXISTS "${dir}/_variant.cmake" OR NOT EXISTS "${dir}/CMakeLists.txt") + if(NOT EXISTS "${dir}/_variant.cmake") set(opentrack_variant "default" CACHE STRING "" FORCE) set(dir "${CMAKE_SOURCE_DIR}/variant/${opentrack_variant}") endif() @@ -26,6 +26,4 @@ function(otr_dist_select_variant) include("${dir}/_variant.cmake") otr_init_variant() - - add_subdirectory("${dir}") endfunction() |