Skip to content

Commit ebd0f42

Browse files
authored
[CMake] Fix macro install rpath (#793) (#803)
1 parent f7ce4d5 commit ebd0f42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/FoundationMacros/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ target_link_libraries(FoundationMacros PUBLIC
4343
SwiftSyntax::SwiftSyntaxBuilder
4444
)
4545

46+
# The macro is installed into lib/swift/host/plugins, but needs to load libraries from lib/swift/host and lib/swift/${SWIFT_SYSTEM_NAME}
4647
set_target_properties(FoundationMacros PROPERTIES
47-
INSTALL_RPATH "$ORIGIN"
48+
INSTALL_RPATH "$ORIGIN/../../../swift/${SWIFT_SYSTEM_NAME}:$ORIGIN/.."
4849
INSTALL_REMOVE_ENVIRONMENT_RPATH ON)
4950

5051
target_compile_options(FoundationMacros PRIVATE -parse-as-library)

0 commit comments

Comments
 (0)