aboutsummaryrefslogtreecommitdiff
path: root/extra/FindNanopb.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'extra/FindNanopb.cmake')
-rw-r--r--extra/FindNanopb.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/extra/FindNanopb.cmake b/extra/FindNanopb.cmake
index bba341d..7730251 100644
--- a/extra/FindNanopb.cmake
+++ b/extra/FindNanopb.cmake
@@ -149,7 +149,11 @@ function(NANOPB_GENERATE_CPP SRCS HDRS)
set(GENERATOR_PATH ${CMAKE_BINARY_DIR}/nanopb/generator)
set(NANOPB_GENERATOR_EXECUTABLE ${GENERATOR_PATH}/nanopb_generator.py)
- set(NANOPB_GENERATOR_PLUGIN ${GENERATOR_PATH}/protoc-gen-nanopb)
+ if (WIN32)
+ set(NANOPB_GENERATOR_PLUGIN ${GENERATOR_PATH}/protoc-gen-nanopb.bat)
+ else()
+ set(NANOPB_GENERATOR_PLUGIN ${GENERATOR_PATH}/protoc-gen-nanopb)
+ endif()
set(GENERATOR_CORE_DIR ${GENERATOR_PATH}/proto)
set(GENERATOR_CORE_SRC