aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Markus Heß <hessi88@googlemail.com>2018-07-10 18:09:35 +0200
committerGravatar Markus Heß <markus.hess@etit.tu-chemnitz.de>2018-07-10 18:23:53 +0200
commit93f6b67eb217812266fb29a00977046789863aca (patch)
treed3ce0d613b99530b070cd4d4f33ba5a4befd6cf8
parent3beb19945b599d448c2524666effe1acdf29165f (diff)
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}
-rw-r--r--cmake/protobuf-config.cmake.in2
1 files changed, 1 insertions, 1 deletions
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 )