2018-10-17 15:22:35 +08:00
|
|
|
diff --git a/cmake/install.cmake b/cmake/install.cmake
|
2019-03-29 06:44:02 +08:00
|
|
|
index 9b2ae93c..7c9670a3 100644
|
2018-10-17 15:22:35 +08:00
|
|
|
--- a/cmake/install.cmake
|
|
|
|
+++ b/cmake/install.cmake
|
2019-03-29 06:44:02 +08:00
|
|
|
@@ -22,10 +22,12 @@ foreach(_library ${_protobuf_libraries})
|
|
|
|
set_property(TARGET ${_library}
|
|
|
|
PROPERTY INSTALL_RPATH "@loader_path")
|
|
|
|
endif()
|
2018-10-17 15:22:35 +08:00
|
|
|
+ if(NOT "${_library}" STREQUAL "libprotobuf-lite")
|
|
|
|
install(TARGETS ${_library} EXPORT protobuf-targets
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${_library}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library})
|
|
|
|
+ endif()
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
if (protobuf_BUILD_PROTOC_BINARIES)
|
2019-03-29 06:44:02 +08:00
|
|
|
@@ -40,7 +42,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
|
|
|
|
endif()
|
2018-10-17 15:22:35 +08:00
|
|
|
endif (protobuf_BUILD_PROTOC_BINARIES)
|
|
|
|
|
|
|
|
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
|
|
|
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
|
|
|
|
|
|
|
file(STRINGS extract_includes.bat.in _extract_strings
|
|
|
|
REGEX "^copy")
|
2019-03-29 06:44:02 +08:00
|
|
|
@@ -121,12 +123,12 @@ configure_file(protobuf-options.cmake
|
2018-10-17 15:22:35 +08:00
|
|
|
# Allows the build directory to be used as a find directory.
|
|
|
|
|
|
|
|
if (protobuf_BUILD_PROTOC_BINARIES)
|
|
|
|
- export(TARGETS libprotobuf-lite libprotobuf libprotoc protoc
|
|
|
|
+ export(TARGETS libprotobuf libprotoc protoc
|
|
|
|
NAMESPACE protobuf::
|
|
|
|
FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake
|
|
|
|
)
|
|
|
|
else (protobuf_BUILD_PROTOC_BINARIES)
|
|
|
|
- export(TARGETS libprotobuf-lite libprotobuf
|
|
|
|
+ export(TARGETS libprotobuf
|
|
|
|
NAMESPACE protobuf::
|
|
|
|
FILE ${CMAKE_INSTALL_CMAKEDIR}/protobuf-targets.cmake
|
|
|
|
)
|