1#
2# Copyright (c) 2022 Nordic Semiconductor ASA
3#
4# SPDX-License-Identifier: Apache-2.0
5#
6
7cmake_minimum_required(VERSION 3.20.0)
8find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
9project(os_mgmt_info)
10
11FILE(GLOB app_sources
12	src/*.c
13)
14
15target_sources(app PRIVATE ${app_sources})
16target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/mgmt/mcumgr/transport/include/mgmt/mcumgr/transport/)
17target_include_directories(app PRIVATE ${ZEPHYR_BASE}/subsys/mgmt/mcumgr/grp/os_mgmt/include/)
18
19if(DEFINED CONFIG_BUILD_DATE_TIME_TEST)
20  set(TEST_DATE_TIME_DIR ${PROJECT_BINARY_DIR}/test)
21  file(MAKE_DIRECTORY ${TEST_DATE_TIME_DIR})
22  file(WRITE ${TEST_DATE_TIME_DIR}/test_date.c "/* Auto generated file, do not edit */\n#include <stdint.h>\nuint8_t *test_date_time = __TIMESTAMP__;")
23  target_sources(app PRIVATE ${TEST_DATE_TIME_DIR}/test_date.c)
24endif()
25