mirror of https://github.com/google/brotli
CMakeLists.txt: use CMAKE_INSTALL_FULL_LIBDIR for runpath on darwin
Without the change on systems where `CMAKE_INSTALL_LIBDIR` is an absolute path outside `CMAKE_INSTALL_PREFIX` (like `nixpkgs`) libraries ended up embedding wrong RPATH and libraries failed to load. The change uses suggestion from https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html to use `CMAKE_INSTALL_FULL_LIBDIR` (similar to library install code) to enbed it as an RPATH.
This commit is contained in:
parent
53947c15f5
commit
3ad47114b8
|
@ -113,7 +113,7 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
|
|||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
add_definitions(-DOS_MACOSX)
|
||||
set(CMAKE_MACOS_RPATH TRUE)
|
||||
set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
endif()
|
||||
|
||||
if(BROTLI_EMSCRIPTEN)
|
||||
|
|
Loading…
Reference in New Issue