796232f0f27ec6a6db242eaf25f79f4280490941
[staging/xdg-launcher.git] / docs / dev_guide / 4_advanced_customization.md
1 # Advanced customization
2
3 ## Including additionnals cmake files
4
5 Advanced tuning is possible using addionnals cmake files that are included
6 automatically from some specifics locations. They are included in that order:
7
8 - Project CMake files normaly located in _<project-root-path>/conf.d/app-templates/cmake/cmake.d_
9 - Home CMake files located in _$HOME/.config/app-templates/cmake.d_
10 - System CMake files located in _/etc/app-templates/cmake.d_
11
12 CMake files has to be named using the following convention: `XX-***.cmake`,
13 where `XX` are numbers, `***` file name (ie. `99-my_customs.cmake`).
14
15 So, saying that you should be aware that every normal cmake variables used at
16 project level could be overwrited by home or system located cmake files if
17 variables got the same name. Exceptions are cached variables set using
18 **CACHE** keyword:
19
20 Example:
21
22 ```cmake
23 set(VARIABLE_NAME 'value string random' CACHE STRING 'docstring')
24 ```
25
26 ## Include customs templated scripts
27
28 As well as for additionnals cmake files you can include your own templated
29 scripts that will be passed to cmake command `configure_file`.
30
31 Just create your own script to the following directories:
32
33 - Home location in _$HOME/.config/app-templates/scripts_
34 - System location in _/etc/app-templates/scripts_
35
36 Scripts only needs to use the extension `.in` to be parsed and configured by
37 CMake command.