1#
2# Copyright (c) 2023, Nordic Semiconductor ASA.
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6
7cmake_policy(SET CMP0076 NEW)
8set(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR})
9set(NRF_BOARD_SELECTED True)
10
11add_library(platform_ns STATIC)
12
13set(partition_includes
14    ${CMAKE_CURRENT_LIST_DIR}/common/${NRF_SOC_VARIANT}/partition
15    ${CMAKE_BINARY_DIR}/../zephyr/include/generated
16)
17
18set(board_includes
19    ${CMAKE_BINARY_DIR}/../zephyr/misc/generated/syscalls_links/include
20)
21
22target_include_directories(platform_region_defs
23    INTERFACE
24        ${partition_includes}
25)
26
27target_include_directories(platform_ns
28    PUBLIC
29        ${partition_includes}
30        ${board_includes}
31)
32
33# Get the value of HAL_NORDIC_PATH
34include(${CMAKE_CURRENT_LIST_DIR}/common/core/config_nordic_nrf_spe.cmake)
35add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/common/${NRF_SOC_VARIANT} ${NRF_SOC_VARIANT})
36
37target_include_directories(platform_ns
38    PUBLIC
39        ${CMAKE_CURRENT_LIST_DIR}
40)
41
42target_link_libraries(platform_ns
43    PUBLIC
44        platform_region_defs
45)
46