Skip to content

Commit 1b5fdce

Browse files
authored
Merge pull request swiftlang#284 from compnerd/linking
build: repair build on Windows
2 parents 8c65878 + 4052548 commit 1b5fdce

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

Sources/LanguageServerProtocol/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ add_library(LanguageServerProtocol
7070
)
7171
set_target_properties(LanguageServerProtocol PROPERTIES
7272
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
73-
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
73+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
7474
target_link_libraries(LanguageServerProtocol PUBLIC
75+
swiftDispatch
7576
Foundation)
7677
endif()
7778

Sources/SourceKitLSP/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ target_link_libraries(SourceKitLSP PUBLIC
3939
SKSwiftPMWorkspace
4040
SourceKitD
4141
TSCUtility)
42+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
43+
target_link_libraries(SourceKitLSP PRIVATE
44+
FoundationXML)
45+
endif()
4246

4347
if(BUILD_SHARED_LIBS)
4448
get_swift_host_arch(swift_arch)

Sources/sourcekit-lsp/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ target_link_libraries(sourcekit-lsp PRIVATE
1111
LanguageServerProtocolJSONRPC
1212
SourceKitLSP
1313
TSCUtility)
14+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
15+
target_link_libraries(sourcekit-lsp PRIVATE
16+
FoundationXML)
17+
endif()
1418

1519
install(TARGETS sourcekit-lsp
1620
DESTINATION bin)

0 commit comments

Comments
 (0)