Skip to content

Commit 29adefb

Browse files
committed
build: install the libdispatch dependencies into the right location
On Windows targets, the runtime components are installed into bin, the link time components are installed into lib. In order to accomodate this, we need to install via the TARGETS type rather than FILES.
1 parent 81e87ac commit 29adefb

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

CMakeLists.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,12 +977,24 @@ if(SWIFT_NEED_EXPLICIT_LIBDISPATCH)
977977
add_dependencies(dispatch libdispatch-install)
978978
add_dependencies(BlocksRuntime libdispatch-install)
979979

980+
if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
981+
set(SOURCEKIT_RUNTIME_DIR bin)
982+
else()
983+
set(SOURCEKIT_RUNTIME_DIR lib)
984+
endif()
980985
swift_install_in_component(sourcekit-inproc
981986
FILES
982987
$<TARGET_FILE:dispatch>
983988
$<TARGET_FILE:BlocksRuntime>
984-
DESTINATION
985-
lib${LLVM_LIBDIR_SUFFIX})
989+
DESTINATION ${SOURCEKIT_RUNTIME_DIR})
990+
if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
991+
swift_install_in_component(sourcekit-inproc
992+
FILES
993+
$<TARGET_LINKER_FILE:dispatch>
994+
$<TARGET_LINKER_FILE:BlocksRuntime>
995+
DESTINATION lib)
996+
endif()
997+
986998

987999
# FIXME(compnerd) this should be taken care of by the
9881000
# INTERFACE_INCLUDE_DIRECTORIES above

0 commit comments

Comments
 (0)