From 7c57393dcbb9b56970ad5e341d3cba0cb76dc22c Mon Sep 17 00:00:00 2001 From: Owen Voorhees Date: Wed, 29 Oct 2025 21:23:22 -0700 Subject: [PATCH] Add installation support to CMake build --- Sources/BuildServerProtocol/CMakeLists.txt | 5 +++++ Sources/LanguageServerProtocol/CMakeLists.txt | 5 +++++ Sources/LanguageServerProtocolTransport/CMakeLists.txt | 5 +++++ Sources/SKLogging/CMakeLists.txt | 9 +++++++++ Sources/ToolsProtocolsSwiftExtensions/CMakeLists.txt | 9 +++++++++ 5 files changed, 33 insertions(+) diff --git a/Sources/BuildServerProtocol/CMakeLists.txt b/Sources/BuildServerProtocol/CMakeLists.txt index 53a7d6cba..63bf95c51 100644 --- a/Sources/BuildServerProtocol/CMakeLists.txt +++ b/Sources/BuildServerProtocol/CMakeLists.txt @@ -30,3 +30,8 @@ target_link_libraries(BuildServerProtocol PRIVATE LanguageServerProtocol) set_property(GLOBAL APPEND PROPERTY SWIFTTOOLSPROTOCOLS_EXPORTS BuildServerProtocol) + +install(TARGETS BuildServerProtocol + ARCHIVE DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") diff --git a/Sources/LanguageServerProtocol/CMakeLists.txt b/Sources/LanguageServerProtocol/CMakeLists.txt index fbe2f0ac4..8c4a6322c 100644 --- a/Sources/LanguageServerProtocol/CMakeLists.txt +++ b/Sources/LanguageServerProtocol/CMakeLists.txt @@ -155,3 +155,8 @@ target_link_libraries(LanguageServerProtocol PUBLIC $<$>:Foundation>) set_property(GLOBAL APPEND PROPERTY SWIFTTOOLSPROTOCOLS_EXPORTS LanguageServerProtocol) + +install(TARGETS LanguageServerProtocol + ARCHIVE DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") diff --git a/Sources/LanguageServerProtocolTransport/CMakeLists.txt b/Sources/LanguageServerProtocolTransport/CMakeLists.txt index 5faea8e87..efebe4a30 100644 --- a/Sources/LanguageServerProtocolTransport/CMakeLists.txt +++ b/Sources/LanguageServerProtocolTransport/CMakeLists.txt @@ -21,3 +21,8 @@ target_link_libraries(LanguageServerProtocolTransport PRIVATE $<$>:Foundation>) set_property(GLOBAL APPEND PROPERTY SWIFTTOOLSPROTOCOLS_EXPORTS LanguageServerProtocolTransport) + +install(TARGETS LanguageServerProtocolTransport + ARCHIVE DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") diff --git a/Sources/SKLogging/CMakeLists.txt b/Sources/SKLogging/CMakeLists.txt index 3ddd3bfee..6bf522521 100644 --- a/Sources/SKLogging/CMakeLists.txt +++ b/Sources/SKLogging/CMakeLists.txt @@ -30,3 +30,12 @@ target_link_libraries(_SKLoggingForPlugin PUBLIC set_property(GLOBAL APPEND PROPERTY SWIFTTOOLSPROTOCOLS_EXPORTS SKLogging) set_property(GLOBAL APPEND PROPERTY SWIFTTOOLSPROTOCOLS_EXPORTS _SKLoggingForPlugin) + +install(TARGETS SKLogging + ARCHIVE DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") +install(TARGETS _SKLoggingForPlugin + ARCHIVE DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") diff --git a/Sources/ToolsProtocolsSwiftExtensions/CMakeLists.txt b/Sources/ToolsProtocolsSwiftExtensions/CMakeLists.txt index 5c3a1b16d..e3963999d 100644 --- a/Sources/ToolsProtocolsSwiftExtensions/CMakeLists.txt +++ b/Sources/ToolsProtocolsSwiftExtensions/CMakeLists.txt @@ -30,3 +30,12 @@ target_link_libraries(_ToolsProtocolsSwiftExtensionsForPlugin PRIVATE set_property(GLOBAL APPEND PROPERTY SWIFTTOOLSPROTOCOLS_EXPORTS ToolsProtocolsSwiftExtensions) set_property(GLOBAL APPEND PROPERTY SWIFTTOOLSPROTOCOLS_EXPORTS _ToolsProtocolsSwiftExtensionsForPlugin) + +install(TARGETS ToolsProtocolsSwiftExtensions + ARCHIVE DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") +install(TARGETS _ToolsProtocolsSwiftExtensionsForPlugin + ARCHIVE DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${${PROJECT_NAME}_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")