Commit b10d490e authored by Carlos O'Ryan's avatar Carlos O'Ryan Committed by Adam Cozzette

Fix RPATH when CMAKE_INSTALL_LIBDIR != lib.

In some platforms ${CMAKE_INSTALL_LIBDIR} expands to `lib64`. The libraries
are correctly installed in that directory, but the RPATH is set to point to
`$ORIGIN/../lib`, where it should be `$ORIGIN/../lib64`.
parent e08f01ce
......@@ -33,7 +33,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
if (UNIX AND NOT APPLE)
set_property(TARGET protoc
PROPERTY INSTALL_RPATH "$ORIGIN/../lib")
PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
elseif (APPLE)
set_property(TARGET protoc
PROPERTY INSTALL_RPATH "@loader_path/../lib")
......
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