Skip to content

Commit 224fa2a

Browse files
authored
Merge pull request #17519 from akyrtzi/remove-absolute-rpath-skservice
2 parents 7c4d15f + 4179ceb commit 224fa2a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,13 @@ macro(add_sourcekit_xpc_service name framework_target)
428428

429429
add_dependencies(${framework_target} ${name})
430430

431+
# This is necessary to avoid having an rpath with an absolute build directory.
432+
# Without this, such an rpath is added during build time and preserved at install time.
433+
set_target_properties(${name} PROPERTIES
434+
BUILD_WITH_INSTALL_RPATH On
435+
INSTALL_RPATH "@loader_path/../lib"
436+
INSTALL_NAME_DIR "@rpath")
437+
431438
if (SOURCEKIT_DEPLOYMENT_OS MATCHES "^macosx")
432439
add_custom_command(TARGET ${name} POST_BUILD
433440
COMMAND ${CMAKE_COMMAND} -E create_symlink "Versions/Current/XPCServices" XPCServices

0 commit comments

Comments
 (0)