aboutsummaryrefslogtreecommitdiff
path: root/cmake/install.cmake
diff options
context:
space:
mode:
authorWalter Gray <wgray@leapmotion.com>2016-05-26 18:04:32 -0700
committerWalter Gray <wgray@leapmotion.com>2016-05-26 18:05:58 -0700
commit04265e40dadbaadf63242e24dfb8912fcfb02cce (patch)
tree0677c415a311bdbb01408c12f3f18987de15b5c8 /cmake/install.cmake
parent2131b2d544bf6eeb789c128ef3e9e04fc299237a (diff)
downloadprotobuf-04265e40dadbaadf63242e24dfb8912fcfb02cce.tar.gz
protobuf-04265e40dadbaadf63242e24dfb8912fcfb02cce.tar.bz2
protobuf-04265e40dadbaadf63242e24dfb8912fcfb02cce.zip
Remove if(TRUE)
Diffstat (limited to 'cmake/install.cmake')
-rw-r--r--cmake/install.cmake54
1 files changed, 26 insertions, 28 deletions
diff --git a/cmake/install.cmake b/cmake/install.cmake
index 6e3d41a1..a5040b22 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -16,34 +16,32 @@ endforeach()
install(TARGETS protoc EXPORT protobuf-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
-if(TRUE)
- file(STRINGS extract_includes.bat.in _extract_strings
- REGEX "^copy")
- foreach(_extract_string ${_extract_strings})
- string(REPLACE "copy \${PROTOBUF_SOURCE_WIN32_PATH}\\" ""
- _extract_string ${_extract_string})
- string(REPLACE "\\" "/" _extract_string ${_extract_string})
- string(REGEX MATCH "^[^ ]+"
- _extract_from ${_extract_string})
- string(REGEX REPLACE "^${_extract_from} ([^$]+)" "\\1"
- _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}")
- install(FILES "${_extract_from}"
- DESTINATION "${_extract_to}"
- COMPONENT protobuf-headers
- RENAME "${_extract_name}")
- else()
- message(AUTHOR_WARNING "The file \"${_extract_from}\" is listed in "
- "\"${protobuf_SOURCE_DIR}/cmake/extract_includes.bat.in\" "
- "but there not exists. The file will not be installed.")
- endif()
- endforeach()
-endif()
+file(STRINGS extract_includes.bat.in _extract_strings
+ REGEX "^copy")
+foreach(_extract_string ${_extract_strings})
+ string(REPLACE "copy \${PROTOBUF_SOURCE_WIN32_PATH}\\" ""
+ _extract_string ${_extract_string})
+ string(REPLACE "\\" "/" _extract_string ${_extract_string})
+ string(REGEX MATCH "^[^ ]+"
+ _extract_from ${_extract_string})
+ string(REGEX REPLACE "^${_extract_from} ([^$]+)" "\\1"
+ _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}")
+ install(FILES "${_extract_from}"
+ DESTINATION "${_extract_to}"
+ COMPONENT protobuf-headers
+ RENAME "${_extract_name}")
+ else()
+ message(AUTHOR_WARNING "The file \"${_extract_from}\" is listed in "
+ "\"${protobuf_SOURCE_DIR}/cmake/extract_includes.bat.in\" "
+ "but there not exists. The file will not be installed.")
+ endif()
+endforeach()
# Internal function for parsing auto tools scripts
function(_protobuf_auto_list FILE_NAME VARIABLE)