1# SPDX-License-Identifier: Apache-2.0 2 3add_library(mylib lib.c) 4 5# Demonstrate that our library includes a generated header so we need the following dependency 6add_dependencies(mylib nanopb_generated_headers) 7 8# Add include directory to find the generated headers 9target_include_directories(mylib PRIVATE ${CMAKE_BINARY_DIR}) 10 11# Link against zephyr 12target_link_libraries(mylib zephyr) 13