Skip to content

Commit

Permalink
Watch face selection with CMake
Browse files Browse the repository at this point in the history
Integrate the new infinitime_apps library and enable user applications selection using the CMake variable ENABLE_USERAPPS.
  • Loading branch information
JF002 committed Dec 19, 2023
1 parent 39b9b17 commit 1567e7e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,19 @@ if(EXISTS ${InfiniTime_DIR}/src/displayapp/fonts/CMakeLists.txt)
target_link_libraries(infinisim PRIVATE infinitime_fonts)
endif()

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 ()

if(EXISTS ${InfiniTime_DIR}/src/displayapp/apps/CMakeLists.txt)
# available since https://github.com/InfiniTimeOrg/InfiniTime/pull/1928
message(STATUS "add subdirectory ${InfiniTime_DIR}/src/displayapp/apps for 'infinitime_apps' target")
add_subdirectory(${InfiniTime_DIR}/src/displayapp/apps displayapp/apps)
target_link_libraries(infinisim PRIVATE infinitime_apps)
endif()

option(BUILD_RESOURCES "Generate a resource.zip file to install to spi.raw file" ON)
if(BUILD_RESOURCES)
if(EXISTS ${InfiniTime_DIR}/src/resources/CMakeLists.txt)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ The following configuration settings can be added to the first `cmake -S . -B bu
- `-DWITH_PNG=ON`: enable/disable the screenshot to `PNG` support.
Per default InfiniSim tries to use `libpng` to create screenshots in PNG format.
This requires `libpng` development libraries as build and runtime dependency.
Can be disabled with cmake config setting `-DWITH_PNG=OFF`.
Can be disabled with cmake config setting `-DWITH_PNG=OFF`
- `-DENABLE_USERAPPS`: ordered list of user applications to build into InfiniTime. Values must be fields from the enumeration `Pinetime::Applications::Apps` and must be separated by a comma. Ex: `-DENABLE_USERAPPS="Apps::Timer, Apps::Alarm"`. The default list of user applications will be selected if this variable is not set.

## Run Simulator

Expand Down

0 comments on commit 1567e7e

Please sign in to comment.