X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=docs%2Fdev_guide%2F4_advanced_customization.md;h=6c12fb812e6f078db314a3d17a39b725a2ca59b3;hb=8a77e99d6814db9918cf266a3b9a36f10622d60b;hp=0d8957e35a391d64e64c6119d005671a27542bcb;hpb=9c71a765f0e4f53a6bbae5f550515b93eb9d7c53;p=apps%2Fapp-templates.git diff --git a/docs/dev_guide/4_advanced_customization.md b/docs/dev_guide/4_advanced_customization.md index 0d8957e..6c12fb8 100644 --- a/docs/dev_guide/4_advanced_customization.md +++ b/docs/dev_guide/4_advanced_customization.md @@ -1,7 +1,9 @@ -# Advanced customization +# Advanced build customization ## Including additionnals cmake files +### Machine and system custom cmake files + Advanced tuning is possible using addionnals cmake files that are included automatically from some specifics locations. They are included in that order: @@ -9,8 +11,8 @@ automatically from some specifics locations. They are included in that order: - Home CMake files located in _$HOME/.config/app-templates/cmake.d_ - System CMake files located in _/etc/app-templates/cmake.d_ -CMake files has to be named using the following convention: `XX-common-*.cmake` -or `XX-${PROJECT_NAME}-*.cmake`, where `XX` are numbers, `*` file name +CMake files has to be named using the following convention: `XX-common*.cmake` +or `XX-${PROJECT_NAME}*.cmake`, where `XX` are numbers, `*` file name (ie. `99-common-my_customs.cmake`). > **NOTE** You need to specify after numbers that indicate include order, to @@ -28,6 +30,29 @@ Example: set(VARIABLE_NAME 'value string random' CACHE STRING 'docstring') ``` +### OS custom cmake files + + +This is meant to personalize the project depending on the OS your are using. +At the end of config.cmake, common.cmake will include lot of cmake file to +customize project build depending on your plateform. It will detect your OS +deducing it from file _/etc/os-release_ now as default in almost all Linux +distribution. + +So you can use the value of field **ID_LIKE** or **ID** if the +first one doesn't exists and add a cmake file for that distribution in your +_conf.d/cmake/_ directory or relatively to your _app-templates_ submodule path +_app-templates/../cmake/_ + +Those files has to be named use the following scheme _XX-${OSRELEASE}*.cmake_ +where _XX_ are numbers, ${OSRELEASE} the **ID_LIKE** or **ID** field from +_/etc/os-release_ file. You can also define default OS configuration file +to use as fallback is none specific OS configuration is available using the +scheme _XX-default*.cmake_. Then is you need by example a module that isn't +named the same in one distro only, you only has to define a specific file to +handle that case then for all the other case put the configuration in the +default file. + ## Include customs templated scripts As well as for additionnals cmake files you can include your own templated