summaryrefslogtreecommitdiffstats
path: root/docs/dev_guide/4_advanced_customization.md
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-07-04 19:00:40 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commit989eb4b774d941a0b6192917e76bd422bae968d2 (patch)
tree0a54be85b5095ce087e78144442c599f5707531f /docs/dev_guide/4_advanced_customization.md
parent9e01b88db70d572967b2122a0195f6d38121a49b (diff)
Update doc & use gitbook to enhance doc generation
Change-Id: If42c916f7664ea67b818a21b8f50c66c41e11f89 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'docs/dev_guide/4_advanced_customization.md')
-rw-r--r--docs/dev_guide/4_advanced_customization.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/docs/dev_guide/4_advanced_customization.md b/docs/dev_guide/4_advanced_customization.md
new file mode 100644
index 0000000..796232f
--- /dev/null
+++ b/docs/dev_guide/4_advanced_customization.md
@@ -0,0 +1,37 @@
+# Advanced customization
+
+## Including additionnals cmake files
+
+Advanced tuning is possible using addionnals cmake files that are included
+automatically from some specifics locations. They are included in that order:
+
+- Project CMake files normaly located in _<project-root-path>/conf.d/app-templates/cmake/cmake.d_
+- 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-***.cmake`,
+where `XX` are numbers, `***` file name (ie. `99-my_customs.cmake`).
+
+So, saying that you should be aware that every normal cmake variables used at
+project level could be overwrited by home or system located cmake files if
+variables got the same name. Exceptions are cached variables set using
+**CACHE** keyword:
+
+Example:
+
+```cmake
+set(VARIABLE_NAME 'value string random' CACHE STRING 'docstring')
+```
+
+## Include customs templated scripts
+
+As well as for additionnals cmake files you can include your own templated
+scripts that will be passed to cmake command `configure_file`.
+
+Just create your own script to the following directories:
+
+- Home location in _$HOME/.config/app-templates/scripts_
+- System location in _/etc/app-templates/scripts_
+
+Scripts only needs to use the extension `.in` to be parsed and configured by
+CMake command.