1# SPDX-License-Identifier: Apache-2.0 2 3file(GLOB cmake_modules "${CMAKE_CURRENT_LIST_DIR}/*/CMakeLists.txt") 4 5foreach(module ${cmake_modules}) 6 get_filename_component(module_dir ${module} DIRECTORY) 7 get_filename_component(module_name ${module_dir} NAME) 8 zephyr_string(SANITIZE TOUPPER MODULE_NAME_UPPER ${module_name}) 9 10 set(ZEPHYR_${MODULE_NAME_UPPER}_CMAKE_DIR ${module_dir}) 11endforeach() 12 13file(GLOB kconfig_modules "${CMAKE_CURRENT_LIST_DIR}/*/Kconfig") 14 15foreach(module ${kconfig_modules}) 16 get_filename_component(module_dir ${module} DIRECTORY) 17 get_filename_component(module_name ${module_dir} NAME) 18 zephyr_string(SANITIZE TOUPPER MODULE_NAME_UPPER ${module_name}) 19 20 set(ZEPHYR_${MODULE_NAME_UPPER}_KCONFIG ${module_dir}/Kconfig) 21endforeach() 22