cmake: define and create KCONFIG_BINARY_DIR if it doesn't exists
The Zephyr CMake module kconfig.cmake will create files inside KCONFIG_BINARY_DIR. In a default Zephyr build setup, this directory is created by Zephyr CMake module zephyr_module.cmake. But Zephyr CMake modules are modular and thus it must be possible to use kconfig module without zephyr_module. Thus kconfig.cmake must set and create KCONFIG_BINARY_DIR if it does not already exists. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
c3620c8a8e
commit
a450c663f2
1 changed files with 3 additions and 0 deletions
|
@ -19,6 +19,9 @@ file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/kconfig/include/config)
|
|||
|
||||
set_ifndef(KCONFIG_NAMESPACE "CONFIG")
|
||||
|
||||
set_ifndef(KCONFIG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Kconfig)
|
||||
file(MAKE_DIRECTORY ${KCONFIG_BINARY_DIR})
|
||||
|
||||
# Support multiple SOC_ROOT, remove ZEPHYR_BASE as that is always sourced.
|
||||
set(kconfig_soc_root ${SOC_ROOT})
|
||||
list(REMOVE_ITEM kconfig_soc_root ${ZEPHYR_BASE})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue