File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,11 @@ function(add_properties_for_swift_modules target reldir)
244
244
APPEND PROPERTY BUILD_RPATH "@loader_path/${build_reldir} lib/swift/host" )
245
245
set_property (TARGET ${target}
246
246
APPEND PROPERTY INSTALL_RPATH "@loader_path/${reldir} lib/swift/host" )
247
+ if (SWIFT_ALLOW_LINKING_SWIFT_CONTENT_IN_DARWIN_TOOLCHAIN)
248
+ get_filename_component (TOOLCHAIN_BIN_DIR ${CMAKE_Swift_COMPILER} DIRECTORY )
249
+ get_filename_component (TOOLCHAIN_LIB_DIR "${TOOLCHAIN_BIN_DIR} /../lib/swift/macosx" ABSOLUTE )
250
+ target_link_directories (${target} BEFORE PUBLIC ${TOOLCHAIN_LIB_DIR} )
251
+ endif ()
247
252
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD" )
248
253
set_property (TARGET ${target}
249
254
APPEND PROPERTY BUILD_RPATH "$ORIGIN/${build_reldir} lib/swift/host" )
You can’t perform that action at this time.
0 commit comments