From 5d68cf0eca9dab6068d04aeefad0333c5d8a9989 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 2 Dec 2021 09:19:43 -0800 Subject: [PATCH] build: install CSystem into the system CSystem is a leaky library dependency from System and must be distributed. Install the files and make the dependency public so that it is emitted into the clients. --- Sources/CSystem/CMakeLists.txt | 5 +++++ Sources/System/CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Sources/CSystem/CMakeLists.txt b/Sources/CSystem/CMakeLists.txt index 6dba7ff2..0f5d8e8a 100644 --- a/Sources/CSystem/CMakeLists.txt +++ b/Sources/CSystem/CMakeLists.txt @@ -12,4 +12,9 @@ target_include_directories(CSystem INTERFACE include) +install(FILES + include/CSystemLinux.h + include/CSystemWindows.h + include/module.modulemap + DESTINATION include/CSystem) set_property(GLOBAL APPEND PROPERTY SWIFT_SYSTEM_EXPORTS CSystem) diff --git a/Sources/System/CMakeLists.txt b/Sources/System/CMakeLists.txt index e77fa5d9..43958d31 100644 --- a/Sources/System/CMakeLists.txt +++ b/Sources/System/CMakeLists.txt @@ -34,7 +34,7 @@ target_sources(SystemPackage PRIVATE Internals/Mocking.swift Internals/Syscalls.swift Internals/WindowsSyscallAdapters.swift) -target_link_libraries(SystemPackage PRIVATE +target_link_libraries(SystemPackage PUBLIC CSystem)