cmake_minimum_required(VERSION 3.20.0)

set(ZEPHYR_EXTRA_MODULES ${CMAKE_CURRENT_LIST_DIR})

if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/boards/pm_static.yml")
  set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/boards/pm_static.yml)
endif()

if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/boards/app.overlay")
  set(DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/boards/app.overlay")
  set(mcuboot_DTC_OVERLAY_FILE "${CMAKE_CURRENT_SOURCE_DIR}/boards/app.overlay")
endif()

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

project(appcore)

target_sources(app PRIVATE src/main.c)
target_include_directories(app PRIVATE .)
