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_tests)
7
8list(APPEND CMAKE_MODULE_PATH ${ZEPHYR_BASE}/modules/nanopb)
9include(nanopb)
10
11zephyr_nanopb_sources(app proto/simple.proto)
12
13zephyr_nanopb_sources(app
14  proto/complex.proto
15  proto/sub/nested.proto
16)
17
18FILE(GLOB app_sources src/*.c)
19target_sources(app PRIVATE ${app_sources})
20
21# Process our own library
22add_subdirectory(lib)
23target_include_directories(app PRIVATE lib)
24target_link_libraries(app PRIVATE mylib)
25