Skip to content

Commit

Permalink
fixed protobuf_generate function
Browse files Browse the repository at this point in the history
  • Loading branch information
fwinnen committed Sep 19, 2017
1 parent 1f5d444 commit 4f5f525
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/protobuf-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function(protobuf_generate)
list(APPEND _singleargs TARGET)
endif()

cmake_parse_arguments(protobuf_generate "APPEND_PATH" "${_singleargs}" "PROTOS IMPORT_DIRS GENERATE_EXTENSIONS" "${ARGN}")
cmake_parse_arguments(protobuf_generate "APPEND_PATH" "${_singleargs}" "PROTOS;IMPORT_DIRS;GENERATE_EXTENSIONS" "${ARGN}")

if(protobuf_generate_PROTOS AND NOT protobuf_generate_TARGET)
if(NOT protobuf_generate_PROTOS AND NOT protobuf_generate_TARGET)
message(SEND_ERROR "Error: protobuf_generate called without any targets or source files")
return()
endif()
Expand Down Expand Up @@ -83,7 +83,7 @@ function(protobuf_generate)
get_filename_component(_abs_file ${_proto} ABSOLUTE)
get_filename_component(_basename ${_proto} NAME_WE)

foreach(_ext ${_output_extensions})
foreach(_ext ${protobuf_GENERATE_EXTENSIONS})
list(APPEND _generated_srcs "${CMAKE_CURRENT_BINARY_DIR}/${_basename}${_ext}")
endforeach()

Expand Down

0 comments on commit 4f5f525

Please sign in to comment.