cmake: kconfig: Configure KCONFIG_ROOT variable

This configures the KCONFIG_ROOT variable to perform variable
substitution, this allows external applications/modules to supply
variables for this when will then be correctly used.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2023-05-17 09:31:32 +01:00 committed by Carles Cufí
commit 0972cb9d87

View file

@ -55,6 +55,9 @@ foreach(root ${kconfig_board_root})
endforeach()
if(KCONFIG_ROOT)
# Perform any variable substitutions if they are present
string(CONFIGURE "${KCONFIG_ROOT}" KCONFIG_ROOT)
zephyr_file(APPLICATION_ROOT KCONFIG_ROOT)
# KCONFIG_ROOT has either been specified as a CMake variable or is
# already in the CMakeCache.txt. This has precedence.