aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2023-12-21 20:37:09 +0100
committerJF <JF002@users.noreply.github.com>2023-12-23 21:29:13 +0100
commit7794378e967e5492c9d3f5f5d77dfa77ba974edd (patch)
treeeda406213952caf8857918e9212c661e7fdb8a53
parentf0e8bb26e94d4fd7c063c2fe5ead76c165cad5a0 (diff)
CMake user application selection
Move ENABLE_USERAPPS and USERAPP_TYPES from the root CMake file to src/displayapp/apps/CMakeLists.txt so we do not need to repeat it in InfiniSim
-rw-r--r--CMakeLists.txt6
-rw-r--r--src/displayapp/apps/CMakeLists.txt6
2 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca6b45bf..2e3a033d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,12 +45,6 @@ string(STRIP "${PROJECT_GIT_COMMIT_HASH}" PROJECT_GIT_COMMIT_HASH)
message("PROJECT_GIT_COMMIT_HASH_SUCCESS? " ${PROJECT_GIT_COMMIT_HASH_SUCCESS})
-if(DEFINED ENABLE_USERAPPS)
- set(USERAPP_TYPES ${ENABLE_USERAPPS} CACHE STRING "List of user apps to build into the firmware")
-else ()
- set(USERAPP_TYPES "Apps::Navigation, Apps::StopWatch, Apps::Alarm, Apps::Timer, Apps::Steps, Apps::HeartRate, Apps::Music, Apps::Paint, Apps::Paddle, Apps::Twos, Apps::Metronome" CACHE STRING "List of user apps to build into the firmware")
-endif ()
-
message("")
message("BUILD CONFIGURATION")
message("-------------------")
diff --git a/src/displayapp/apps/CMakeLists.txt b/src/displayapp/apps/CMakeLists.txt
index 808496e5..fd9f94ef 100644
--- a/src/displayapp/apps/CMakeLists.txt
+++ b/src/displayapp/apps/CMakeLists.txt
@@ -1,3 +1,9 @@
+if(DEFINED ENABLE_USERAPPS)
+ set(USERAPP_TYPES ${ENABLE_USERAPPS} CACHE STRING "List of user apps to build into the firmware")
+else ()
+ set(USERAPP_TYPES "Apps::Navigation, Apps::StopWatch, Apps::Alarm, Apps::Timer, Apps::Steps, Apps::HeartRate, Apps::Music, Apps::Paint, Apps::Paddle, Apps::Twos, Apps::Metronome" CACHE STRING "List of user apps to build into the firmware")
+endif ()
+
add_library(infinitime_apps INTERFACE)
target_sources(infinitime_apps INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/Apps.h")
target_include_directories(infinitime_apps INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/")