# Specify the minimum required version of CMake for compatibility
cmake_minimum_required(VERSION 3.20.0)

# Set the path to the pm_static.yml file
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/pm_static.yml)

# Find the Zephyr package, which is required for building the application
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

set(BOARD_ROOT ${CMAKE_CURRENT_LIST_DIR})

# Set the project name
project(app)

file(GLOB_RECURSE app_sources
    ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c
)

# Add the sources to the target
target_sources(app PRIVATE ${app_sources})

# Ensure the NRF directory path is set properly from Zephyr base
set(NRF_PATH $ENV{ZEPHYR_BASE}/../nrf)