Tidyup the Apple RPATH usage

Use @rpath for build and install to reference dynamic libraries
Set RPATH to "@executable_path/../lib" when linking
This commit is contained in:
Jake Turner
2021-03-14 11:17:31 +00:00
committed by Baldur Karlsson
parent 67e277717c
commit 9c787bd05d
3 changed files with 14 additions and 6 deletions
+4 -4
View File
@@ -595,11 +595,11 @@ endif()
# On macOS set the rpath so that linked libraries are relative to the executable, not absolute
if(APPLE)
set_target_properties(renderdoc PROPERTIES MACOSX_RPATH 1)
set_target_properties(renderdoc PROPERTIES MACOSX_RPATH TRUE)
set_target_properties(renderdoc PROPERTIES SKIP_BUILD_RPATH TRUE)
set_target_properties(renderdoc PROPERTIES INSTALL_RPATH "@executable_path/../lib")
set_target_properties(renderdoc PROPERTIES INSTALL_NAME_DIR "@executable_path/../lib")
set_target_properties(renderdoc PROPERTIES BUILD_WITH_INSTALL_RPATH 1)
set_target_properties(renderdoc PROPERTIES BUILD_WITH_INSTALL_NAME_DIR 1)
set_target_properties(renderdoc PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
set_target_properties(renderdoc PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE)
endif()
if(ANDROID)