Commit f0a5c103 authored by Feng Xiao's avatar Feng Xiao Committed by GitHub

Merge pull request #2836 from xfxyjwf/i894

Double-quote file paths in extract_includes.bat.in
parents ddfc86b1 c94555f9
This diff is collapsed.
...@@ -20,18 +20,12 @@ install(TARGETS protoc EXPORT protobuf-targets ...@@ -20,18 +20,12 @@ install(TARGETS protoc EXPORT protobuf-targets
file(STRINGS extract_includes.bat.in _extract_strings file(STRINGS extract_includes.bat.in _extract_strings
REGEX "^copy") REGEX "^copy")
foreach(_extract_string ${_extract_strings}) foreach(_extract_string ${_extract_strings})
string(REPLACE "copy \${PROTOBUF_SOURCE_WIN32_PATH}\\" "" string(REGEX REPLACE "^.* .+ include\\\\(.+)$" "\\1"
_extract_string ${_extract_string}) _header ${_extract_string})
string(REPLACE "\\" "/" _extract_string ${_extract_string}) string(REPLACE "\\" "/" _header ${_header})
string(REGEX MATCH "^[^ ]+" get_filename_component(_extract_from "${protobuf_SOURCE_DIR}/../src/${_header}" ABSOLUTE)
_extract_from ${_extract_string}) get_filename_component(_extract_name ${_header} NAME)
string(REGEX REPLACE "^${_extract_from} ([^$]+)" "\\1" get_filename_component(_extract_to "${CMAKE_INSTALL_INCLUDEDIR}/${_header}" PATH)
_extract_to ${_extract_string})
get_filename_component(_extract_from "${protobuf_SOURCE_DIR}/${_extract_from}" ABSOLUTE)
get_filename_component(_extract_name ${_extract_to} NAME)
get_filename_component(_extract_to ${_extract_to} PATH)
string(REPLACE "include/" "${CMAKE_INSTALL_INCLUDEDIR}/"
_extract_to "${_extract_to}")
if(EXISTS "${_extract_from}") if(EXISTS "${_extract_from}")
install(FILES "${_extract_from}" install(FILES "${_extract_from}"
DESTINATION "${_extract_to}" DESTINATION "${_extract_to}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment