Skip to content

Commit f74c879

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 512baf9 commit f74c879

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
@@ -88,3 +88,9 @@ set_property(GLOBAL APPEND PROPERTY SWIFTDRIVER_EXPORTS SwiftDriver)
8888
set_target_properties(SwiftDriver PROPERTIES
8989
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
9090

91+
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
92+
install(TARGETS SwiftDriver
93+
ARCHIVE DESTINATION lib
94+
LIBRARY DESTINATION lib
95+
RUNTIME DESTINATION bin)
96+
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)