Skip to content

build: repair build on Windows #284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Sources/LanguageServerProtocol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ add_library(LanguageServerProtocol
)
set_target_properties(LanguageServerProtocol PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(LanguageServerProtocol PUBLIC
swiftDispatch
Foundation)
endif()

Expand Down
4 changes: 4 additions & 0 deletions Sources/SourceKitLSP/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ target_link_libraries(SourceKitLSP PUBLIC
SKSwiftPMWorkspace
SourceKitD
TSCUtility)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(SourceKitLSP PRIVATE
FoundationXML)
endif()

if(BUILD_SHARED_LIBS)
get_swift_host_arch(swift_arch)
Expand Down
4 changes: 4 additions & 0 deletions Sources/sourcekit-lsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ target_link_libraries(sourcekit-lsp PRIVATE
LanguageServerProtocolJSONRPC
SourceKitLSP
TSCUtility)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(sourcekit-lsp PRIVATE
FoundationXML)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this redundant with the change to Sourcekit/CMakeLists.txt? We only use FoundationXML in that module.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite possibly! This is an old change that I didn’t update. I’ll adjust and update it :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okay, this was needed to resolve a path issue when building against the Foundation build tree products as the import FoundationXML causes the client to see the import.

endif()

install(TARGETS sourcekit-lsp
DESTINATION bin)