Skip to content

build: allow building with dispatch and Foundation from the toolchain #328

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 1 commit into from
Oct 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
6 changes: 4 additions & 2 deletions Sources/LSPLogging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ add_library(LSPLogging
set_target_properties(LSPLogging PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(LSPLogging PRIVATE
Foundation)
if(Foundation_FOUND)
target_link_libraries(LSPLogging PRIVATE
Foundation)
endif()
endif()

if(BUILD_SHARED_LIBS)
Expand Down
11 changes: 8 additions & 3 deletions Sources/LanguageServerProtocol/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,14 @@ add_library(LanguageServerProtocol
set_target_properties(LanguageServerProtocol PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(LanguageServerProtocol PUBLIC
swiftDispatch
Foundation)
if(dispatch_FOUND)
target_link_libraries(LanguageServerProtocol PUBLIC
swiftDispatch)
endif()
if(Foundation_FOUND)
target_link_libraries(LanguageServerProtocol PUBLIC
Foundation)
endif()
endif()

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

if(BUILD_SHARED_LIBS)
Expand Down
6 changes: 4 additions & 2 deletions Sources/sourcekit-lsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ target_link_libraries(sourcekit-lsp PRIVATE
SourceKitLSP
TSCUtility)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(sourcekit-lsp PRIVATE
FoundationXML)
if(Foundation_FOUND)
target_link_libraries(sourcekit-lsp PRIVATE
FoundationXML)
endif()
endif()

install(TARGETS sourcekit-lsp
Expand Down