File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -217,17 +217,22 @@ function(add_properties_for_swift_modules target reldir)
217217 # Workaround for a linker crash related to autolinking: rdar://77839981
218218 set_property (TARGET ${target} APPEND_STRING PROPERTY
219219 LINK_FLAGS " -lobjc " )
220+
221+ set_property (TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH} " )
222+ set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
220223 elseif (CMAKE_SYSTEM_NAME MATCHES "Linux|Android|OpenBSD|FreeBSD" )
221224 string (REGEX MATCH "^[^-]*" arch ${LLVM_TARGET_TRIPLE} )
222225 target_link_libraries (${target} PRIVATE swiftCore-linux-${arch} )
223226 string (TOLOWER ${CMAKE_SYSTEM_NAME} platform)
224227 set (SWIFT_BUILD_RPATH "${LLDB_SWIFT_LIBS} /${platform} " )
225228 set (SWIFT_INSTALL_RPATH "$ORIGIN/${reldir} lib/swift/${platform} " )
229+ set_property (TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH} " )
230+ set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
231+ elseif (CMAKE_SYSTEM_NAME MATCHES Windows)
232+ target_link_directories (${target} PRIVATE
233+ ${SWIFT_PATH_TO_SWIFT_SDK} /usr/lib/swift/Windows/x86_64)
226234 endif ()
227235
228- set_property (TARGET ${target} APPEND PROPERTY BUILD_RPATH "${SWIFT_BUILD_RPATH} " )
229- set_property (TARGET ${target} APPEND PROPERTY INSTALL_RPATH "${SWIFT_INSTALL_RPATH} " )
230-
231236 if (SWIFT_SWIFT_PARSER)
232237 if (CMAKE_SYSTEM_NAME MATCHES "Darwin" )
233238 set_property (TARGET ${target}
You can’t perform that action at this time.
0 commit comments