From 1ad78400727871a4b8dbfe90ef52c7be998c1518 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Tue, 19 Dec 2023 16:37:04 +0100 Subject: Watch face selection at build time Replace the options that allowed to select the user apps independently by a single string variable that contains the ordered list of apps to build. --- doc/code/Apps.md | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/code/Apps.md b/doc/code/Apps.md index 2d49c60e..16cb3992 100644 --- a/doc/code/Apps.md +++ b/doc/code/Apps.md @@ -159,22 +159,10 @@ If your application is a **user** application, you don't need to add anything in everything will be automatically generated for you. The user application will also be automatically be added to the app launcher menu. -Since the list of **user** application is generated by CMake, add a new `option` in the main [CMakeLists.txt file](../../CMakeLists.txt). The application will be built by default if the value is set to `True`. : +Since the list of **user** application is generated by CMake, you need to add the variable `ENABLE_USERAPPS` to the command line of CMake. This variable must be set with a string composed of an ordered list of the **user** applications that must be built into the firmware. The items of the list are fields from the enumeration `Apps`. Ex : build the firmware with 3 user application : Alarm, Timer and MyApp (the application will be listed in this specific order in the application menu). ```cmake -option(ENABLE_APP_MYAPP "Enable the MyApp application" True) -``` - -The default value can be overridden by passing an additional parameter to the command line of CMake : - -```cmake -$ cmake ... -DENABLE_APP_MYAPP=True ... -``` - -Then add your **user app** to the list of apps by calling `AddToListIfEnabled()` : - -```cmake -AddToListIfEnabled(USERAPP_TYPES_LIST ${ENABLE_APP_MYAPP} "Apps::MyApp") +$ cmake ... -DENABLE_USERAPPS="Apps::Alarm, Apps::Timer, Apps::MyApp" ... ``` You should now be able to [build](../buildAndProgram.md) the firmware -- cgit v1.2.3-70-g09d2