From 93f6b67eb217812266fb29a00977046789863aca Mon Sep 17 00:00:00 2001 From: Markus Heß Date: Tue, 10 Jul 2018 18:09:35 +0200 Subject: protobuf_generate(): add relative path to output dir Without this fix, protobuf_generate() sets the variable _generated_srcs to ${protobuf_generate_PROTOC_OUT_DIR}/${_rel_dir}/${_basename}${_ext} but generates the files in ${protobuf_generate_PROTOC_OUT_DIR}/${_basename}${_ext} --- cmake/protobuf-config.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/protobuf-config.cmake.in b/cmake/protobuf-config.cmake.in index 18054687..69d63e3e 100644 --- a/cmake/protobuf-config.cmake.in +++ b/cmake/protobuf-config.cmake.in @@ -105,7 +105,7 @@ function(protobuf_generate) add_custom_command( OUTPUT ${_generated_srcs} COMMAND protobuf::protoc - ARGS --${protobuf_generate_LANGUAGE}_out ${_dll_export_decl}${protobuf_generate_PROTOC_OUT_DIR} ${_protobuf_include_path} ${_abs_file} + ARGS --${protobuf_generate_LANGUAGE}_out ${_dll_export_decl}${protobuf_generate_PROTOC_OUT_DIR}/${_rel_dir} ${_protobuf_include_path} ${_abs_file} DEPENDS ${_abs_file} protobuf::protoc COMMENT "Running ${protobuf_generate_LANGUAGE} protocol buffer compiler on ${_proto}" VERBATIM ) -- cgit v1.2.3