aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Eremin <aeremin@google.com>2023-03-18 10:18:30 +0000
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-03-18 10:18:30 +0000
commit5c6a0f154dcd7d03629a6d818fb0fc24e06f3c05 (patch)
tree9d4ca87623b07ab604e22708c3900b30b01272e5
parent8ab5125b880df9119fae43a8068165781c0792e6 (diff)
downloadpigweed-5c6a0f154dcd7d03629a6d818fb0fc24e06f3c05.tar.gz
pw_protobuf_compiler: Add the missing loop over source files
It fixes proto compilation on Windows. Change-Id: I44901e199373c8c4f11e1e5c145c213a09c91fb6 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/134291 Reviewed-by: Ted Pudlik <tpudlik@google.com> Commit-Queue: Alexey Eremin <aeremin@google.com>
-rw-r--r--pw_protobuf_compiler/proto.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/pw_protobuf_compiler/proto.cmake b/pw_protobuf_compiler/proto.cmake
index 4c518abfe..8ed7519aa 100644
--- a/pw_protobuf_compiler/proto.cmake
+++ b/pw_protobuf_compiler/proto.cmake
@@ -221,9 +221,11 @@ function(_pw_generate_protos TARGET LANGUAGE)
set(generated_outputs "${outputs}" PARENT_SCOPE)
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
- get_filename_component(dir "${source_file}" DIRECTORY)
- get_filename_component(name "${source_file}" NAME_WE)
- set(arg_PLUGIN "${dir}/${name}.bat")
+ foreach(source_file IN LISTS SOURCES)
+ get_filename_component(dir "${source_file}" DIRECTORY)
+ get_filename_component(name "${source_file}" NAME_WE)
+ set(arg_PLUGIN "${dir}/${name}.bat")
+ endforeach()
endif()
set(script "$ENV{PW_ROOT}/pw_protobuf_compiler/py/pw_protobuf_compiler/generate_protos.py")