diff --git a/CMakeLists.txt b/CMakeLists.txt index 1443e8ae082..c3eb610fd3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1616,7 +1616,7 @@ if(CONFIG_BUILD_OUTPUT_META) COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/zephyr_module.py ${WEST_ARG} ${ZEPHYR_MODULES_ARG} - ${ZEPHYR_EXTRA_MODULES_ARG} + ${EXTRA_ZEPHYR_MODULES_ARG} --meta-out ${KERNEL_META_NAME} $<$:--meta-state-propagate> ) diff --git a/cmake/modules/zephyr_module.cmake b/cmake/modules/zephyr_module.cmake index 05d13cf5f24..90afc1f02e5 100644 --- a/cmake/modules/zephyr_module.cmake +++ b/cmake/modules/zephyr_module.cmake @@ -36,9 +36,9 @@ if(ZEPHYR_MODULES) set(ZEPHYR_MODULES_ARG "--modules" ${ZEPHYR_MODULES}) endif() -zephyr_get(ZEPHYR_EXTRA_MODULES) -if(ZEPHYR_EXTRA_MODULES) - set(ZEPHYR_EXTRA_MODULES_ARG "--extra-modules" ${ZEPHYR_EXTRA_MODULES}) +zephyr_get(EXTRA_ZEPHYR_MODULES VAR EXTRA_ZEPHYR_MODULES ZEPHYR_EXTRA_MODULES) +if(EXTRA_ZEPHYR_MODULES) + set(EXTRA_ZEPHYR_MODULES_ARG "--extra-modules" ${EXTRA_ZEPHYR_MODULES}) endif() file(MAKE_DIRECTORY ${KCONFIG_BINARY_DIR}) @@ -60,7 +60,7 @@ if(WEST OR ZEPHYR_MODULES) ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/zephyr_module.py ${west_arg} ${ZEPHYR_MODULES_ARG} - ${ZEPHYR_EXTRA_MODULES_ARG} + ${EXTRA_ZEPHYR_MODULES_ARG} --kconfig-out ${kconfig_modules_file} --cmake-out ${cmake_modules_file} --sysbuild-kconfig-out ${kconfig_sysbuild_file} diff --git a/samples/application_development/out_of_tree_driver/CMakeLists.txt b/samples/application_development/out_of_tree_driver/CMakeLists.txt index 3f3932363d0..a234427218f 100644 --- a/samples/application_development/out_of_tree_driver/CMakeLists.txt +++ b/samples/application_development/out_of_tree_driver/CMakeLists.txt @@ -2,7 +2,7 @@ # 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. -list(APPEND ZEPHYR_EXTRA_MODULES +list(APPEND EXTRA_ZEPHYR_MODULES ${CMAKE_CURRENT_SOURCE_DIR}/hello_world_module ) diff --git a/tests/boot/mcuboot_recovery_retention/sysbuild.cmake b/tests/boot/mcuboot_recovery_retention/sysbuild.cmake index 2825102e11e..cc73038d6ce 100644 --- a/tests/boot/mcuboot_recovery_retention/sysbuild.cmake +++ b/tests/boot/mcuboot_recovery_retention/sysbuild.cmake @@ -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") diff --git a/tests/cmake/overlays/var_expansions/CMakeLists.txt b/tests/cmake/overlays/var_expansions/CMakeLists.txt index db382a53e96..a36cc87bf8e 100644 --- a/tests/cmake/overlays/var_expansions/CMakeLists.txt +++ b/tests/cmake/overlays/var_expansions/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.20.0) 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}) project(overlay_var_expansions)