Skip to content

Commit e3975b9

Browse files
committed
Fix installation on Windows: add missing DLLs
SwiftPM depends on SwiftDriver and SwiftOptions DLLs, so they should be installed into the toolchain bin directory
1 parent 41b152b commit e3975b9

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Sources/SwiftDriver/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,9 @@ set_property(GLOBAL APPEND PROPERTY SWIFTDRIVER_EXPORTS SwiftDriver)
8787
set_target_properties(SwiftDriver PROPERTIES
8888
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
8989

90+
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
91+
install(TARGETS SwiftDriver
92+
ARCHIVE DESTINATION lib
93+
LIBRARY DESTINATION lib
94+
RUNTIME DESTINATION bin)
95+
endif()

Sources/SwiftOptions/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,10 @@ set_property(GLOBAL APPEND PROPERTY SWIFTDRIVER_EXPORTS SwiftOptions)
2424
# NOTE: workaround for CMake not setting up include flags yet
2525
set_target_properties(SwiftOptions PROPERTIES
2626
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
27+
28+
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
29+
install(TARGETS SwiftOptions
30+
ARCHIVE DESTINATION lib
31+
LIBRARY DESTINATION lib
32+
RUNTIME DESTINATION bin)
33+
endif()

0 commit comments

Comments
 (0)