[CMake] Always use @rpath for XCTest

rdar://problem/23942371
This commit is contained in:
Ben Langmuir
2016-01-25 17:43:16 -08:00
parent c212e763f2
commit 1ad89fb8a7

View File

@@ -915,8 +915,12 @@ function(_add_swift_library_single target name)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
set(install_name_dir "@rpath")
if(SWIFTLIB_SINGLE_IS_STDLIB)
set(install_name_dir "${SWIFT_DARWIN_STDLIB_INSTALL_NAME_DIR}")
# Always use @rpath for XCTest.
if(NOT "${module_name}" STREQUAL "XCTest")
set(install_name_dir "${SWIFT_DARWIN_STDLIB_INSTALL_NAME_DIR}")
endif()
endif()
set_target_properties("${target}"