From f0e8bb26e94d4fd7c063c2fe5ead76c165cad5a0 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Tue, 19 Dec 2023 17:53:48 +0100 Subject: Watch face selection with CMake Move displayapp/Apps.h into a header only library (to make the integration easier in InfiniSim. --- CMakeLists.txt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 1537bda6..ca6b45bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,12 +34,6 @@ endif() set(TARGET_DEVICE "PINETIME" CACHE STRING "Target device") set_property(CACHE TARGET_DEVICE PROPERTY STRINGS PINETIME MOY_TFK5 MOY_TIN5 MOY_TON5 MOY_UNK) -if(ENABLE_USERAPPS) - set(USERAPP_TYPES ${ENABLE_USERAPPS}) -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") -endif () - set(PROJECT_GIT_COMMIT_HASH "") execute_process(COMMAND git rev-parse --short HEAD @@ -51,6 +45,12 @@ 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("-------------------") @@ -70,13 +70,9 @@ if(BUILD_RESOURCES) else() message(" * Build resources : Disabled") endif() -message(" * User apps : " ${USERAPP_TYPES}) set(VERSION_EDIT_WARNING "// Do not edit this file, it is automatically generated by CMAKE!") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/Version.h) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docker/post_build.sh.in ${CMAKE_CURRENT_BINARY_DIR}/post_build.sh) -# Generate the list of user apps to be compiled into the firmware -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/displayapp/Apps.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/displayapp/Apps.h) - add_subdirectory(src) -- cgit v1.2.3-70-g09d2