cmake: align Zephyr module variable to EXTRA_ZEPHYR_MODULES
Align Zephyr modules with other user facing variables where settings can be defined or extended, meaning Zephyr modules now supports: ZEPHYR_MODULES and EXTRA_ZEPHYR_MODULES. Support for ZEPHYR_EXTRA_MODULES is kept foir backward compatibility. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
parent
1120934874
commit
a88502783b
|
@ -1616,7 +1616,7 @@ if(CONFIG_BUILD_OUTPUT_META)
|
||||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/zephyr_module.py
|
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/zephyr_module.py
|
||||||
${WEST_ARG}
|
${WEST_ARG}
|
||||||
${ZEPHYR_MODULES_ARG}
|
${ZEPHYR_MODULES_ARG}
|
||||||
${ZEPHYR_EXTRA_MODULES_ARG}
|
${EXTRA_ZEPHYR_MODULES_ARG}
|
||||||
--meta-out ${KERNEL_META_NAME}
|
--meta-out ${KERNEL_META_NAME}
|
||||||
$<$<BOOL:${CONFIG_BUILD_OUTPUT_META_STATE_PROPAGATE}>:--meta-state-propagate>
|
$<$<BOOL:${CONFIG_BUILD_OUTPUT_META_STATE_PROPAGATE}>:--meta-state-propagate>
|
||||||
)
|
)
|
||||||
|
|
|
@ -36,9 +36,9 @@ if(ZEPHYR_MODULES)
|
||||||
set(ZEPHYR_MODULES_ARG "--modules" ${ZEPHYR_MODULES})
|
set(ZEPHYR_MODULES_ARG "--modules" ${ZEPHYR_MODULES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
zephyr_get(ZEPHYR_EXTRA_MODULES)
|
zephyr_get(EXTRA_ZEPHYR_MODULES VAR EXTRA_ZEPHYR_MODULES ZEPHYR_EXTRA_MODULES)
|
||||||
if(ZEPHYR_EXTRA_MODULES)
|
if(EXTRA_ZEPHYR_MODULES)
|
||||||
set(ZEPHYR_EXTRA_MODULES_ARG "--extra-modules" ${ZEPHYR_EXTRA_MODULES})
|
set(EXTRA_ZEPHYR_MODULES_ARG "--extra-modules" ${EXTRA_ZEPHYR_MODULES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(MAKE_DIRECTORY ${KCONFIG_BINARY_DIR})
|
file(MAKE_DIRECTORY ${KCONFIG_BINARY_DIR})
|
||||||
|
@ -60,7 +60,7 @@ if(WEST OR ZEPHYR_MODULES)
|
||||||
${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/zephyr_module.py
|
${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/zephyr_module.py
|
||||||
${west_arg}
|
${west_arg}
|
||||||
${ZEPHYR_MODULES_ARG}
|
${ZEPHYR_MODULES_ARG}
|
||||||
${ZEPHYR_EXTRA_MODULES_ARG}
|
${EXTRA_ZEPHYR_MODULES_ARG}
|
||||||
--kconfig-out ${kconfig_modules_file}
|
--kconfig-out ${kconfig_modules_file}
|
||||||
--cmake-out ${cmake_modules_file}
|
--cmake-out ${cmake_modules_file}
|
||||||
--sysbuild-kconfig-out ${kconfig_sysbuild_file}
|
--sysbuild-kconfig-out ${kconfig_sysbuild_file}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# For the sake of demonstration, we add the driver directory as a zephyr module
|
# For the sake of demonstration, we add the driver directory as a zephyr module
|
||||||
# by hand. If your driver is a project that's managed by west, you can remove this line.
|
# by hand. If your driver is a project that's managed by west, you can remove this line.
|
||||||
list(APPEND ZEPHYR_EXTRA_MODULES
|
list(APPEND EXTRA_ZEPHYR_MODULES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hello_world_module
|
${CMAKE_CURRENT_SOURCE_DIR}/hello_world_module
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
set(mcuboot_ZEPHYR_EXTRA_MODULES "${CMAKE_CURRENT_LIST_DIR}/test_module" CACHE INTERNAL "test_module directory")
|
set(mcuboot_EXTRA_ZEPHYR_MODULES "${CMAKE_CURRENT_LIST_DIR}/test_module" CACHE INTERNAL "test_module directory")
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
cmake_minimum_required(VERSION 3.20.0)
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
|
||||||
set(ZEPHYR_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/my_module")
|
set(ZEPHYR_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/my_module")
|
||||||
set(ZEPHYR_EXTRA_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/my_extra_module")
|
set(EXTRA_ZEPHYR_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/my_extra_module")
|
||||||
|
|
||||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||||
project(overlay_var_expansions)
|
project(overlay_var_expansions)
|
||||||
|
|
Loading…
Reference in a new issue