fix-static-build.patch 531 B

12345678910111213
  1. diff --git a/cmake/install.cmake b/cmake/install.cmake
  2. index 4091bc8..9850018 100644
  3. --- a/cmake/install.cmake
  4. +++ b/cmake/install.cmake
  5. @@ -31,7 +31,7 @@ endforeach()
  6. if (protobuf_BUILD_PROTOC_BINARIES)
  7. install(TARGETS protoc EXPORT protobuf-targets
  8. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
  9. - if (UNIX AND NOT APPLE)
  10. + if (UNIX AND NOT APPLE AND NOT protobuf_MSVC_STATIC_RUNTIME)
  11. set_property(TARGET protoc
  12. PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
  13. elseif (APPLE)