24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
|
diff --git a/swift-corelibs-libdispatch/src/CMakeLists.txt b/swift-corelibs-libdispatch/src/CMakeLists.txt
|
||
|
index f71b68f..81c4ade 100644
|
||
|
--- a/swift-corelibs-libdispatch/src/CMakeLists.txt
|
||
|
+++ b/swift-corelibs-libdispatch/src/CMakeLists.txt
|
||
|
@@ -144,6 +144,7 @@ if(ENABLE_SWIFT)
|
||
|
-lBlocksRuntime
|
||
|
-L $<TARGET_LINKER_FILE_DIR:dispatch>
|
||
|
-ldispatch
|
||
|
+ -Xlinker -rpath -Xlinker "\\\$\$ORIGIN"
|
||
|
$<$<AND:$<PLATFORM_ID:Windows>,$<CONFIG:Debug>>:-lmsvcrtd>
|
||
|
$<$<AND:$<PLATFORM_ID:Windows>,$<NOT:$<CONFIG:Debug>>>:-lmsvcrt>
|
||
|
MODULE_NAME
|
||
|
@@ -260,6 +261,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
||
|
"-Xlinker -dead_strip"
|
||
|
"-Xlinker -alias_list -Xlinker ${PROJECT_SOURCE_DIR}/xcodeconfig/libdispatch.aliases")
|
||
|
endif()
|
||
|
+
|
||
|
+set_target_properties(dispatch PROPERTIES INSTALL_RPATH "$ORIGIN")
|
||
|
+set_target_properties(dispatch PROPERTIES BUILD_WITH_INSTALL_RPATH YES)
|
||
|
+
|
||
|
dispatch_set_linker(dispatch)
|
||
|
|
||
|
install(TARGETS
|