Incorrect selection of base name

protoc just changes last extension. We need this change to support files like a.b.proto in the path.
This commit is contained in:
afshinpir 2020-04-04 21:08:01 +04:30 committed by Adam Cozzette
parent df6e3a2f54
commit c62ffaa539

View File

@ -97,7 +97,7 @@ function(protobuf_generate)
foreach(_proto ${protobuf_generate_PROTOS})
get_filename_component(_abs_file ${_proto} ABSOLUTE)
get_filename_component(_abs_dir ${_abs_file} DIRECTORY)
get_filename_component(_basename ${_proto} NAME_WE)
get_filename_component(_basename ${_proto} NAME_WLE)
file(RELATIVE_PATH _rel_dir ${CMAKE_CURRENT_SOURCE_DIR} ${_abs_dir})
set(_generated_srcs)