1# SPDX-License-Identifier: Apache-2.0 2 3cmake_minimum_required(VERSION 3.20.0) 4 5find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) 6project(nanopb_sample) 7 8list(APPEND CMAKE_MODULE_PATH ${ZEPHYR_BASE}/modules/nanopb) 9include(nanopb) 10 11if(CONFIG_SAMPLE_UNLUCKY_NUMBER) 12 set(unlucky_number_type "FT_DEFAULT") 13else() 14 set(unlucky_number_type "FT_IGNORE") 15endif() 16zephyr_nanopb_sources(app src/simple.proto) 17 18FILE(GLOB app_sources src/*.c) 19target_sources(app PRIVATE ${app_sources}) 20