Commit a315bb8b authored by Feng Xiao's avatar Feng Xiao

Merge pull request #1614 from yeswalrus/cmake-cleanup

Remove unused lines from CMake files.
parents e2158285 457a2975
...@@ -16,10 +16,9 @@ endforeach() ...@@ -16,10 +16,9 @@ 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})
...@@ -42,8 +41,7 @@ if(TRUE) ...@@ -42,8 +41,7 @@ if(TRUE)
"\"${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)
......
...@@ -2,12 +2,8 @@ ...@@ -2,12 +2,8 @@
set(PROTOBUF_VERSION "@protobuf_VERSION@") set(PROTOBUF_VERSION "@protobuf_VERSION@")
set(PROTOBUF_VERSION_STRING "@protobuf_VERSION_STRING@") set(PROTOBUF_VERSION_STRING "@protobuf_VERSION_STRING@")
# Current dir
get_filename_component(_PROTOBUF_PACKAGE_PREFIX
"${CMAKE_CURRENT_LIST_FILE}" PATH)
# Imported targets # Imported targets
include("${_PROTOBUF_PACKAGE_PREFIX}/protobuf-targets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/protobuf-targets.cmake")
# Compute the installation prefix relative to this file. # Compute the installation prefix relative to this file.
get_filename_component(_PROTOBUF_IMPORT_PREFIX get_filename_component(_PROTOBUF_IMPORT_PREFIX
...@@ -21,7 +17,3 @@ get_filename_component(_PROTOBUF_IMPORT_PREFIX ...@@ -21,7 +17,3 @@ get_filename_component(_PROTOBUF_IMPORT_PREFIX
if(NOT DEFINED PROTOBUF_MODULE_COMPATIBLE OR "${PROTOBUF_MODULE_COMPATIBLE}") if(NOT DEFINED PROTOBUF_MODULE_COMPATIBLE OR "${PROTOBUF_MODULE_COMPATIBLE}")
include("${_PROTOBUF_PACKAGE_PREFIX}/protobuf-module.cmake") include("${_PROTOBUF_PACKAGE_PREFIX}/protobuf-module.cmake")
endif() endif()
# Cleanup temporary variables.
set(_PROTOBUF_PACKAGE_PREFIX)
set(_PROTOBUF_IMPORT_PREFIX)
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