termux-packages/packages/swift/swiftpm-rpath.patch

20 lines
910 B
Diff
Raw Normal View History

commit 75be121002348a7f0c3995f6a6ff63fcbe21aaed
Date: Tue Mar 31 01:14:18 2020 +0530
[PackageDescription] Add missing relative SDK rpath to libPackageDescription.so shared libraries (#2661)
diff --git a/swiftpm/Sources/PackageDescription/CMakeLists.txt b/swiftpm/Sources/PackageDescription/CMakeLists.txt
index ee9eda32..ea704129 100644
--- a/swiftpm/Sources/PackageDescription/CMakeLists.txt
+++ b/swiftpm/Sources/PackageDescription/CMakeLists.txt
@@ -47,6 +47,9 @@ foreach(PACKAGE_DESCRIPTION_VERSION 4 4_2)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(PD${PACKAGE_DESCRIPTION_VERSION} PRIVATE
Foundation)
+ set_target_properties(PD${PACKAGE_DESCRIPTION_VERSION} PROPERTIES
+ BUILD_WITH_INSTALL_RPATH TRUE
+ INSTALL_RPATH "$ORIGIN/../../$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>")
endif()
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)