Skip to content

Commit 6ba9edf

Browse files
committed
Add libcurl for CF
1 parent 24dcbae commit 6ba9edf

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Package.swift

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ let package = Package(
6666
name: "CoreFoundationPackage",
6767
dependencies: [
6868
.product(name: "FoundationICU", package: "swift-foundation-icu"),
69-
"Clibxml2"
69+
"Clibxml2",
70+
"Clibcurl"
7071
],
7172
path: "Sources/CoreFoundation",
72-
exclude: ["CFURLSessionInterface.c"], // TODO: Need curl
7373
cSettings: buildSettings
7474
),
7575
.systemLibrary(
@@ -80,6 +80,14 @@ let package = Package(
8080
.apt(["libxml2-dev"])
8181
]
8282
),
83+
.systemLibrary(
84+
name: "Clibcurl",
85+
pkgConfig: "libcurl",
86+
providers: [
87+
.brew(["libcurl"]),
88+
.apt(["libcurl"])
89+
]
90+
),
8391
.executableTarget(
8492
name: "plutil",
8593
dependencies: ["Foundation"]
@@ -104,6 +112,9 @@ let package = Package(
104112
resources: [
105113
.copy("Tests/Foundation/Resources/Info.plist"),
106114
.copy("Tests/Foundation/Resources/NSStringTestData.txt")
115+
],
116+
swiftSettings: [
117+
.define("NS_FOUNDATION_ALLOWS_TESTABLE_IMPORT")
107118
]
108119
),
109120
]
File renamed without changes.

0 commit comments

Comments
 (0)