We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c709a34 + 05ad652 commit 59eebe3Copy full SHA for 59eebe3
cmake/install.cmake
@@ -78,7 +78,10 @@ foreach(_header ${protobuf_HEADERS})
78
elseif (_find_nosrc GREATER -1)
79
set(_from_dir "${protobuf_SOURCE_DIR}")
80
endif()
81
- string(REPLACE "${_from_dir}" "" _header ${_header})
+ # On some platforms `_form_dir` ends up being just "protobuf", which can
82
+ # easily match multiple times in our paths. We force it to only replace
83
+ # prefixes to avoid this case.
84
+ string(REGEX REPLACE "^${_from_dir}" "" _header ${_header})
85
get_filename_component(_extract_from "${_from_dir}/${_header}" ABSOLUTE)
86
get_filename_component(_extract_name ${_header} NAME)
87
get_filename_component(_extract_to "${CMAKE_INSTALL_INCLUDEDIR}/${_header}" DIRECTORY)
0 commit comments