Commit 04265e40 authored by Walter Gray's avatar Walter Gray

Remove if(TRUE)

parent 2131b2d5
...@@ -16,34 +16,32 @@ endforeach() ...@@ -16,34 +16,32 @@ endforeach()
install(TARGETS protoc EXPORT protobuf-targets install(TARGETS protoc EXPORT protobuf-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
if(TRUE) 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(REPLACE "copy \${PROTOBUF_SOURCE_WIN32_PATH}\\" "" _extract_string ${_extract_string})
_extract_string ${_extract_string}) string(REPLACE "\\" "/" _extract_string ${_extract_string})
string(REPLACE "\\" "/" _extract_string ${_extract_string}) string(REGEX MATCH "^[^ ]+"
string(REGEX MATCH "^[^ ]+" _extract_from ${_extract_string})
_extract_from ${_extract_string}) string(REGEX REPLACE "^${_extract_from} ([^$]+)" "\\1"
string(REGEX REPLACE "^${_extract_from} ([^$]+)" "\\1" _extract_to ${_extract_string})
_extract_to ${_extract_string}) get_filename_component(_extract_from "${protobuf_SOURCE_DIR}/${_extract_from}" ABSOLUTE)
get_filename_component(_extract_from "${protobuf_SOURCE_DIR}/${_extract_from}" ABSOLUTE) get_filename_component(_extract_name ${_extract_to} NAME)
get_filename_component(_extract_name ${_extract_to} NAME) get_filename_component(_extract_to ${_extract_to} PATH)
get_filename_component(_extract_to ${_extract_to} PATH) string(REPLACE "include/" "${CMAKE_INSTALL_INCLUDEDIR}/"
string(REPLACE "include/" "${CMAKE_INSTALL_INCLUDEDIR}/" _extract_to "${_extract_to}")
_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}" COMPONENT protobuf-headers
COMPONENT protobuf-headers RENAME "${_extract_name}")
RENAME "${_extract_name}") else()
else() message(AUTHOR_WARNING "The file \"${_extract_from}\" is listed in "
message(AUTHOR_WARNING "The file \"${_extract_from}\" is listed in " "\"${protobuf_SOURCE_DIR}/cmake/extract_includes.bat.in\" "
"\"${protobuf_SOURCE_DIR}/cmake/extract_includes.bat.in\" " "but there not exists. The file will not be installed.")
"but there not exists. The file will not be installed.") endif()
endif() endforeach()
endforeach()
endif()
# Internal function for parsing auto tools scripts # Internal function for parsing auto tools scripts
function(_protobuf_auto_list FILE_NAME VARIABLE) function(_protobuf_auto_list FILE_NAME VARIABLE)
......
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