Skip to content

Commit 5c942f6

Browse files
compnerdaciidgh
authored andcommitted
build: add re-export for Foundation
PackageDescription4 requires that Foundation be re-exported for users.
1 parent 5e9228f commit 5c942f6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ else()
3939
find_package(LLBuild CONFIG REQUIRED)
4040
endif()
4141

42+
find_package(dispatch QUIET)
43+
find_package(Foundation QUIET)
44+
4245
add_subdirectory(Sources)
4346

4447
if(SWIFTPM_BUILD_DIR)

Sources/PackageDescription4/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ foreach(PACKAGE_DESCRIPTION_VERSION 4 4_2)
4242
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pm/${PACKAGE_DESCRIPTION_VERSION}
4343
)
4444

45+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
46+
target_link_libraries(PD${PACKAGE_DESCRIPTION_VERSION} PRIVATE
47+
Foundation)
48+
endif()
49+
4550
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
4651
install(FILES
4752
${CMAKE_BINARY_DIR}/pm/${PACKAGE_DESCRIPTION_VERSION}/PackageDescription.swiftinterface

0 commit comments

Comments
 (0)