diff --git a/Sources/BuildServerProtocol/CMakeLists.txt b/Sources/BuildServerProtocol/CMakeLists.txt index d625c16db..53294187d 100644 --- a/Sources/BuildServerProtocol/CMakeLists.txt +++ b/Sources/BuildServerProtocol/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(BuildServerProtocol +add_library(BuildServerProtocol STATIC BuildTargets.swift FileOptions.swift InitializeBuild.swift @@ -9,15 +9,3 @@ set_target_properties(BuildServerProtocol PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) target_link_libraries(BuildServerProtocol PRIVATE LanguageServerProtocol) - -if(BUILD_SHARED_LIBS) - get_swift_host_arch(swift_arch) - install(TARGETS BuildServerProtocol - ARCHIVE DESTINATION lib/swift$<$>:_static>/$/${swift_arch} - LIBRARY DESTINATION lib/swift$<$>:_static>/$/${swift_arch} - RUNTIME DESTINATION bin) - install(FILES - $/BuildServerProtocol.swiftdoc - $/BuildServerProtocol.swiftmodule - DESTINATION lib/swift$<$>:_static>/$/${swift_arch}) -endif() diff --git a/Sources/LSPLogging/CMakeLists.txt b/Sources/LSPLogging/CMakeLists.txt index 2c2822f5f..5d2a67b5f 100644 --- a/Sources/LSPLogging/CMakeLists.txt +++ b/Sources/LSPLogging/CMakeLists.txt @@ -1,19 +1,7 @@ -add_library(LSPLogging +add_library(LSPLogging STATIC LogLevel.swift Logging.swift) set_target_properties(LSPLogging PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) target_link_libraries(LSPLogging PRIVATE $<$>:Foundation>) - -if(BUILD_SHARED_LIBS) - get_swift_host_arch(swift_arch) - install(TARGETS LSPLogging - ARCHIVE DESTINATION lib/swift$<$>:_static>/$ - LIBRARY DESTINATION lib/swift$<$>:_static>/$ - RUNTIME DESTINATION bin) - install(FILES - $/LSPLogging.swiftdoc - $/LSPLogging.swiftmodule - DESTINATION lib/swift$<$>:_static>/$/${swift_arch}) -endif() diff --git a/Sources/LanguageServerProtocol/CMakeLists.txt b/Sources/LanguageServerProtocol/CMakeLists.txt index b8ee01088..ba33f9b60 100644 --- a/Sources/LanguageServerProtocol/CMakeLists.txt +++ b/Sources/LanguageServerProtocol/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(LanguageServerProtocol +add_library(LanguageServerProtocol STATIC Cancellation.swift Connection.swift CustomCodable.swift @@ -95,15 +95,3 @@ set_target_properties(LanguageServerProtocol PROPERTIES target_link_libraries(LanguageServerProtocol PUBLIC $<$>:swiftDispatch> $<$>:Foundation>) - -if(BUILD_SHARED_LIBS) - get_swift_host_arch(swift_arch) - install(TARGETS LanguageServerProtocol - ARCHIVE DESTINATION lib/swift$<$>:_static>/$ - LIBRARY DESTINATION lib/swift$<$>:_static>/$ - RUNTIME DESTINATION bin) - install(FILES - $/LanguageServerProtocol.swiftdoc - $/LanguageServerProtocol.swiftmodule - DESTINATION lib/swift$<$>:_static>/$/${swift_arch}) -endif() diff --git a/Sources/LanguageServerProtocolJSONRPC/CMakeLists.txt b/Sources/LanguageServerProtocolJSONRPC/CMakeLists.txt index 3b6c97a5b..24894b6c9 100644 --- a/Sources/LanguageServerProtocolJSONRPC/CMakeLists.txt +++ b/Sources/LanguageServerProtocolJSONRPC/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(LanguageServerProtocolJSONRPC +add_library(LanguageServerProtocolJSONRPC STATIC DisableSigpipe.swift JSONRPCConnection.swift MessageCoding.swift @@ -11,15 +11,3 @@ target_link_libraries(LanguageServerProtocolJSONRPC PRIVATE target_link_libraries(LanguageServerProtocolJSONRPC PRIVATE $<$>:swiftDispatch> $<$>:Foundation>) - -if(BUILD_SHARED_LIBS) - get_swift_host_arch(swift_arch) - install(TARGETS LanguageServerProtocolJSONRPC - ARCHIVE DESTINATION lib/swift$<$>:_static>/$ - LIBRARY DESTINATION lib/swift$<$>:_static>/$ - RUNTIME DESTINATION bin) - install(FILES - $/LanguageServerProtocolJSONRPC.swiftdoc - $/LanguageServerProtocolJSONRPC.swiftmodule - DESTINATION lib/swift$<$>:_static>/$/${swift_arch}) -endif() diff --git a/Sources/SKCore/CMakeLists.txt b/Sources/SKCore/CMakeLists.txt index 75e715604..7cd686d4c 100644 --- a/Sources/SKCore/CMakeLists.txt +++ b/Sources/SKCore/CMakeLists.txt @@ -1,5 +1,5 @@ -add_library(SKCore +add_library(SKCore STATIC BuildServerBuildSystem.swift BuildSetup.swift BuildSystem.swift @@ -24,15 +24,3 @@ target_link_libraries(SKCore PRIVATE SKSupport SourceKitD TSCUtility) - -if(BUILD_SHARED_LIBS) - get_swift_host_arch(swift_arch) - install(TARGETS SKCore - ARCHIVE DESTINATION lib/swift$<$>:_static>/$ - LIBRARY DESTINATION lib/swift$<$>:_static>/$ - RUNTIME DESTINATION bin) - install(FILES - $/SKCore.swiftdoc - $/SKCore.swiftmodule - DESTINATION lib/swift$<$>:_static>/$/${swift_arch}) -endif() diff --git a/Sources/SKSupport/CMakeLists.txt b/Sources/SKSupport/CMakeLists.txt index d6f8fe9a8..625755b18 100644 --- a/Sources/SKSupport/CMakeLists.txt +++ b/Sources/SKSupport/CMakeLists.txt @@ -1,5 +1,5 @@ -add_library(SKSupport +add_library(SKSupport STATIC BuildConfiguration.swift ByteString.swift FileSystem.swift @@ -12,15 +12,3 @@ set_target_properties(SKSupport PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) target_link_libraries(SKSupport PRIVATE TSCUtility) - -if(BUILD_SHARED_LIBS) - get_swift_host_arch(swift_arch) - install(TARGETS SKSupport - ARCHIVE DESTINATION lib/swift$<$>:_static>/$ - LIBRARY DESTINATION lib/swift$<$>:_static>/$ - RUNTIME DESTINATION bin) - install(FILES - $/SKSupport.swiftdoc - $/SKSupport.swiftmodule - DESTINATION lib/swift$<$>:_static>/$/${swift_arch}) -endif() diff --git a/Sources/SKSwiftPMWorkspace/CMakeLists.txt b/Sources/SKSwiftPMWorkspace/CMakeLists.txt index 62d8779c8..aaa890393 100644 --- a/Sources/SKSwiftPMWorkspace/CMakeLists.txt +++ b/Sources/SKSwiftPMWorkspace/CMakeLists.txt @@ -1,5 +1,5 @@ -add_library(SKSwiftPMWorkspace +add_library(SKSwiftPMWorkspace STATIC SwiftPMWorkspace.swift) set_target_properties(SKSwiftPMWorkspace PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY}) @@ -9,15 +9,3 @@ target_link_libraries(SKSwiftPMWorkspace PRIVATE SKCore) target_link_libraries(SKSwiftPMWorkspace PUBLIC Build) - -if(BUILD_SHARED_LIBS) - get_swift_host_arch(swift_arch) - install(TARGETS SKSwiftPMWorkspace - ARCHIVE DESTINATION lib/swift$<$>:_static>/$ - LIBRARY DESTINATION lib/swift$<$>:_static>/$ - RUNTIME DESTINATION bin) - install(FILES - $/SKSwiftPMWorkspace.swiftdoc - $/SKSwiftPMWorkspace.swiftmodule - DESTINATION lib/swift$<$>:_static>/$/${swift_arch}) -endif() diff --git a/Sources/SourceKitD/CMakeLists.txt b/Sources/SourceKitD/CMakeLists.txt index 0c6133e68..b8720bbde 100644 --- a/Sources/SourceKitD/CMakeLists.txt +++ b/Sources/SourceKitD/CMakeLists.txt @@ -1,5 +1,5 @@ -add_library(SourceKitD +add_library(SourceKitD STATIC SKDRequestArray.swift SKDRequestDictionary.swift SKDResponse.swift @@ -17,15 +17,3 @@ target_link_libraries(SourceKitD PRIVATE LSPLogging SKSupport TSCUtility) - -if(BUILD_SHARED_LIBS) - get_swift_host_arch(swift_arch) - install(TARGETS SourceKitD - ARCHIVE DESTINATION lib/swift$<$>:_static>/$ - LIBRARY DESTINATION lib/swift$<$>:_static>/$ - RUNTIME DESTINATION bin) - install(FILES - $/SourceKitD.swiftdoc - $/SourceKitD.swiftmodule - DESTINATION lib/swift$<$>:_static>/$/${swift_arch}) -endif() diff --git a/Sources/SourceKitLSP/CMakeLists.txt b/Sources/SourceKitLSP/CMakeLists.txt index 29bbb5f9b..00416be21 100644 --- a/Sources/SourceKitLSP/CMakeLists.txt +++ b/Sources/SourceKitLSP/CMakeLists.txt @@ -1,5 +1,5 @@ -add_library(SourceKitLSP +add_library(SourceKitLSP STATIC CapabilityRegistry.swift DocumentManager.swift DocumentTokens.swift @@ -44,15 +44,3 @@ target_link_libraries(SourceKitLSP PUBLIC TSCUtility) target_link_libraries(SourceKitLSP PRIVATE $<$>:FoundationXML>) - -if(BUILD_SHARED_LIBS) - get_swift_host_arch(swift_arch) - install(TARGETS SourceKitLSP - ARCHIVE DESTINATION lib/swift$<$>:_static>/$ - LIBRARY DESTINATION lib/swift$<$>:_static>/$ - RUNTIME DESTINATION bin) - install(FILES - $/SourceKitLSP.swiftdoc - $/SourceKitLSP.swiftmodule - DESTINATION lib/swift$<$>:_static>/$) -endif() diff --git a/Sources/sourcekit-lsp/CMakeLists.txt b/Sources/sourcekit-lsp/CMakeLists.txt index b6f97b0ec..084c9dfd3 100644 --- a/Sources/sourcekit-lsp/CMakeLists.txt +++ b/Sources/sourcekit-lsp/CMakeLists.txt @@ -4,6 +4,7 @@ add_executable(sourcekit-lsp target_link_libraries(sourcekit-lsp PRIVATE ArgumentParser LanguageServerProtocolJSONRPC + SKCore SourceKitLSP TSCUtility) target_link_libraries(sourcekit-lsp PRIVATE