Commit 4b68f959 authored by Torsten Rasmussen's avatar Torsten Rasmussen Committed by Anas Nashif
Browse files

cmake: locating zephyr modules in CMAKE_BINARY_DIR



This commit restores the old behaviour of locating Zephyr modules under
CMAKE_BINARY_DIR instead of CMAKE_CURRENT_BINARY_DIR during building of
Zephyr modules.

Signed-off-by: default avatarTorsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
parent e7656ea8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -480,7 +480,7 @@ if(EXISTS ${CMAKE_BINARY_DIR}/zephyr_modules.txt)
    # https://cmake.org/pipermail/cmake/2019-June/069547.html
    string(TOUPPER ${module_name} MODULE_NAME_UPPER)
    set(ZEPHYR_CURRENT_MODULE_DIR ${ZEPHYR_${MODULE_NAME_UPPER}_MODULE_DIR})
    add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/modules/${module_name})
    add_subdirectory(${ZEPHYR_CURRENT_MODULE_DIR} ${CMAKE_BINARY_DIR}/modules/${module_name})
  endforeach()
  # Done processing modules, clear ZEPHYR_CURRENT_MODULE_DIR.
  set(ZEPHYR_CURRENT_MODULE_DIR)