Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions modules/hal_nordic/nrfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@ endif()

set(INC_DIR ${NRFX_DIR}/drivers/include)
set(SRC_DIR ${NRFX_DIR}/drivers/src)
set(BSP_DIR ${NRFX_DIR}/bsp)
set(HELPERS_DIR ${NRFX_DIR}/helpers)
set(SOC_DIR ${BSP_DIR}/${CONFIG_SOC_NORDIC_BSP_NAME})
set(MDK_DIR ${SOC_DIR}/mdk)

if(NOT CONFIG_SOC_NORDIC_BSP_NAME STREQUAL "stable")
zephyr_compile_definitions(NRFX_BSP_NRF_PATH="${CONFIG_SOC_NORDIC_BSP_NAME}/bsp.h")
if(DEFINED CONFIG_SOC_NORDIC_BSP_PATH_OVERRIDE)
set(BSP_DIR ${ZEPHYR_CURRENT_MODULE_DIR}/${CONFIG_SOC_NORDIC_BSP_PATH_OVERRIDE}/${CONFIG_SOC_NORDIC_BSP_NAME})
else()
set(BSP_DIR ${NRFX_DIR}/bsp/${CONFIG_SOC_NORDIC_BSP_NAME})
endif()

set(MDK_DIR ${BSP_DIR}/mdk)

zephyr_include_directories(${NRFX_DIR})
zephyr_include_directories(${INC_DIR})
zephyr_include_directories(${BSP_DIR})
zephyr_include_directories(${SOC_DIR}/templates)
zephyr_include_directories(${BSP_DIR}/templates)
zephyr_include_directories(.)

include(${SOC_DIR}/zephyr/nrfx.cmake OPTIONAL)
include(${BSP_DIR}/zephyr/nrfx.cmake OPTIONAL)

# Define MDK defines globally
zephyr_compile_definitions_ifdef(CONFIG_SOC_SERIES_NRF51X NRF51)
Expand Down
Loading