User apps selection with CMake (#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
This commit is contained in:
JF 2023-12-23 21:54:05 +01:00 committed by GitHub
parent d6cc458ea2
commit 46f2e0d16f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View File

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

@ -1 +1 @@
Subproject commit ca7d8a668d37d3377aeb38d122a9eccafdd6822d
Subproject commit fc5424cb72e477c5f1bbfaeddb5c50b851a965ae

View File

@ -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