| 1 |
# Note: build fails if this is placed within cdogs/ folder |
| 2 |
include_directories(${NANOPB_INCLUDE_DIRS}) |
| 3 |
|
| 4 |
add_definitions(-DPB_FIELD_16BIT) # Allow larger field numbers in nanopb |
| 5 |
|
| 6 |
# Note: uncomment below line to build new proto files |
| 7 |
# nanopb_generate_cpp(PROTO_SRCS PROTO_HDRS msg.proto) |
| •8 |
set(PROTO_SRCS "msg.pb.c") |
| 9 |
set(PROTO_HDRS "msg.pb.h") |
| 10 |
|
| 11 |
include_directories(${CMAKE_CURRENT_BINARY_DIR}) |
| 12 |
add_library(cdogs_proto STATIC ${PROTO_SRCS} ${PROTO_HDRS} msg.options msg.proto) |
| •13 |
target_link_libraries(cdogs_proto protobuf-nanopb) |