Skip to content

Commit 18c42c1

Browse files
authored
Merge pull request #832 from swiftlang/jgrynspan/fix-rpaths-6.0
[6.0] Update install to ensure the build directory is not added to the rpath
2 parents 7efdd76 + a9d4675 commit 18c42c1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: cmake/modules/SwiftModuleInstallation.cmake

+6-4
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ function(_swift_testing_install_target module)
3232

3333
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
3434
set(lib_destination_dir "lib/${swift}/${swift_os}/testing")
35-
set_property(TARGET ${module} PROPERTY
36-
INSTALL_RPATH "@loader_path/..")
35+
set_target_properties(${module} PROPERTIES
36+
INSTALL_RPATH "@loader_path/.."
37+
INSTALL_REMOVE_ENVIRONMENT_RPATH ON)
3738
else()
3839
set(lib_destination_dir "lib/${swift}/${swift_os}")
39-
set_property(TARGET ${module} PROPERTY
40-
INSTALL_RPATH "$ORIGIN")
40+
set_target_properties(${module} PROPERTIES
41+
INSTALL_RPATH "$ORIGIN"
42+
INSTALL_REMOVE_ENVIRONMENT_RPATH ON)
4143
endif()
4244

4345
install(TARGETS ${module}

0 commit comments

Comments
 (0)