2021-03-10 20:34:57 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2021-08-10 20:44:56 +08:00
|
|
|
cmake_minimum_required(VERSION 3.20.0)
|
2021-03-10 20:34:57 +08:00
|
|
|
|
|
|
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
|
|
|
project(nanopb_sample)
|
|
|
|
|
2023-09-15 02:02:53 +08:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${ZEPHYR_BASE}/modules/nanopb)
|
|
|
|
include(nanopb)
|
|
|
|
|
2024-01-31 15:54:58 +08:00
|
|
|
if(CONFIG_SAMPLE_UNLUCKY_NUMBER)
|
|
|
|
set(unlucky_number_type "FT_DEFAULT")
|
|
|
|
else()
|
|
|
|
set(unlucky_number_type "FT_IGNORE")
|
|
|
|
endif()
|
2023-09-15 02:02:53 +08:00
|
|
|
zephyr_nanopb_sources(app src/simple.proto)
|
2021-03-10 20:34:57 +08:00
|
|
|
|
|
|
|
FILE(GLOB app_sources src/*.c)
|
2023-09-15 02:02:53 +08:00
|
|
|
target_sources(app PRIVATE ${app_sources})
|