Skip to content

Commit

Permalink
User apps selection with CMake (#134)
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`.

Update InfiniTime to after CMake user app selection merged
  • Loading branch information
JF002 authored Dec 23, 2023
1 parent d6cc458 commit 46f2e0d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,13 @@ if(EXISTS ${InfiniTime_DIR}/src/displayapp/fonts/CMakeLists.txt)
target_link_libraries(infinisim PRIVATE infinitime_fonts)
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
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ The following configuration settings can be added to the first `cmake -S . -B bu
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`.
- `-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 46f2e0d

Please sign in to comment.