From fc2871f3c2e1e35a80ab4f32cffb342d850f78db Mon Sep 17 00:00:00 2001 From: Jeremy Schonfeld Date: Fri, 26 Jul 2024 15:26:37 -0700 Subject: [PATCH] [CMake] Fix macro install rpath --- Sources/FoundationMacros/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/FoundationMacros/CMakeLists.txt b/Sources/FoundationMacros/CMakeLists.txt index 0cc31c299..c95c5419e 100644 --- a/Sources/FoundationMacros/CMakeLists.txt +++ b/Sources/FoundationMacros/CMakeLists.txt @@ -43,8 +43,9 @@ target_link_libraries(FoundationMacros PUBLIC SwiftSyntax::SwiftSyntaxBuilder ) +# The macro is installed into lib/swift/host/plugins, but needs to load libraries from lib/swift/host and lib/swift/${SWIFT_SYSTEM_NAME} set_target_properties(FoundationMacros PROPERTIES - INSTALL_RPATH "$ORIGIN" + INSTALL_RPATH "$ORIGIN/../../../swift/${SWIFT_SYSTEM_NAME}:$ORIGIN/.." INSTALL_REMOVE_ENVIRONMENT_RPATH ON) target_compile_options(FoundationMacros PRIVATE -parse-as-library)