Skip to content

Commit 46f2e0d

Browse files
authored
User apps selection with CMake (InfiniTimeOrg#134)
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
1 parent d6cc458 commit 46f2e0d

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,13 @@ if(EXISTS ${InfiniTime_DIR}/src/displayapp/fonts/CMakeLists.txt)
289289
target_link_libraries(infinisim PRIVATE infinitime_fonts)
290290
endif()
291291

292+
if(EXISTS ${InfiniTime_DIR}/src/displayapp/apps/CMakeLists.txt)
293+
# available since https://github.com/InfiniTimeOrg/InfiniTime/pull/1928
294+
message(STATUS "add subdirectory ${InfiniTime_DIR}/src/displayapp/apps for 'infinitime_apps' target")
295+
add_subdirectory(${InfiniTime_DIR}/src/displayapp/apps displayapp/apps)
296+
target_link_libraries(infinisim PRIVATE infinitime_apps)
297+
endif()
298+
292299
option(BUILD_RESOURCES "Generate a resource.zip file to install to spi.raw file" ON)
293300
if(BUILD_RESOURCES)
294301
if(EXISTS ${InfiniTime_DIR}/src/resources/CMakeLists.txt)

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ The following configuration settings can be added to the first `cmake -S . -B bu
8585
Per default InfiniSim tries to use `libpng` to create screenshots in PNG format.
8686
This requires `libpng` development libraries as build and runtime dependency.
8787
Can be disabled with cmake config setting `-DWITH_PNG=OFF`.
88+
- `-DENABLE_USERAPPS`: ordered list of user applications to build into InfiniTime.
89+
Values must be fields from the enumeration `Pinetime::Applications::Apps` and must be separated by a comma.
90+
Ex: `-DENABLE_USERAPPS="Apps::Timer, Apps::Alarm"`.
91+
The default list of user applications will be selected if this variable is not set.
8892

8993
## Run Simulator
9094

0 commit comments

Comments
 (0)