mcuboot/samples/zephyr/hello-world/CMakeLists.txt

27 lines
855 B
CMake

# Top-level CMakeLists.txt for the skeleton application.
#
# Copyright (c) 2017 Open Source Foundries Limited
# Copyright (c) 2018 Foundries.io Ltd
#
# SPDX-License-Identifier: Apache-2.0
#
# This provides a basic application structure suitable for loading by
# mcuboot, which is easy to customize on a per-board basis. It can be
# used as a starting point for new applications.
cmake_minimum_required(VERSION 3.8)
# find_package(Zephyr) in order to load application boilerplate:
# http://docs.zephyrproject.org/application/application.html
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(NONE)
# This string ends up getting printed in the device console
if (NOT DEFINED FROM_WHO)
set(FROM_WHO Zephyr)
endif()
target_compile_definitions(app PRIVATE "-DMCUBOOT_HELLO_WORLD_FROM=\"${FROM_WHO}\"")
target_sources(app PRIVATE src/main.c)