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.
This commit is contained in:

committed by
JF

parent
f2996f54a8
commit
1ad7840072
@@ -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
|
||||
|
Reference in New Issue
Block a user