From 0327bcfddf14e58a15df879a631a5ae5b9156c7c Mon Sep 17 00:00:00 2001 From: Alex Hoppen Date: Thu, 11 Jan 2024 13:33:11 -0800 Subject: [PATCH] Add a CMake build for the `SourceKitLSPAPI` module --- Sources/CMakeLists.txt | 1 + Sources/SourceKitLSPAPI/CMakeLists.txt | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 Sources/SourceKitLSPAPI/CMakeLists.txt diff --git a/Sources/CMakeLists.txt b/Sources/CMakeLists.txt index 07863f734cf..20491e537fc 100644 --- a/Sources/CMakeLists.txt +++ b/Sources/CMakeLists.txt @@ -26,6 +26,7 @@ add_subdirectory(PackageSigning) add_subdirectory(SPMBuildCore) add_subdirectory(SPMLLBuild) add_subdirectory(SourceControl) +add_subdirectory(SourceKitLSPAPI) add_subdirectory(swift-bootstrap) add_subdirectory(swift-build) add_subdirectory(swift-experimental-sdk) diff --git a/Sources/SourceKitLSPAPI/CMakeLists.txt b/Sources/SourceKitLSPAPI/CMakeLists.txt new file mode 100644 index 00000000000..243bda5650f --- /dev/null +++ b/Sources/SourceKitLSPAPI/CMakeLists.txt @@ -0,0 +1,18 @@ +# This source file is part of the Swift open source project +# +# Copyright (c) 2014 - 2024 Apple Inc. and the Swift project authors +# Licensed under Apache License v2.0 with Runtime Library Exception +# +# See http://swift.org/LICENSE.txt for license information +# See http://swift.org/CONTRIBUTORS.txt for Swift project authors + +add_library(SourceKitLSPAPI STATIC + BuildDescription.swift + PluginTargetBuildDescription.swift) +target_link_libraries(SourceKitLSPAPI PUBLIC + Build + SPMBuildCore) + +# NOTE(compnerd) workaround for CMake not setting up include flags yet +set_target_properties(SourceKitLSPAPI PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})