Skip to content

Commit

Permalink
fix: Pull in upstream nanopb fix for protoc locating.
Browse files Browse the repository at this point in the history
  • Loading branch information
petejohanson committed Nov 10, 2024
1 parent c4fd619 commit 698c462
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/nanopb/nanopb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ include_guard(GLOBAL)

list(APPEND CMAKE_MODULE_PATH ${ZEPHYR_NANOPB_MODULE_DIR}/extra)

find_program(PROTOC protoc)
if(NOT PROTOC)
find_package(Nanopb REQUIRED)

if(NOT PROTOBUF_PROTOC_EXECUTABLE)
message(FATAL_ERROR "'protoc' not found, please ensure protoc is installed\
and in path. See https://docs.zephyrproject.org/latest/samples/modules/nanopb/README.html")
else()
message(STATUS "Found protoc: ${PROTOBUF_PROTOC_EXECUTABLE}")
endif()

find_package(Nanopb REQUIRED)
Expand Down

0 comments on commit 698c462

Please sign in to comment.