Skip to content

Commit 0100d60

Browse files
authored
build: silence a pkg-config warning on Windows (#6701)
Windows does not have pkg-config by default. Since the nuget support is still incomplete, prefer to simply disregard the pkg-config spec on Windows.
1 parent 106c681 commit 0100d60

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Package.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ let swiftPMProduct = (
6161
]
6262
)
6363

64+
#if os(Windows)
65+
let systemSQLitePkgConfig: String? = nil
66+
#else
67+
let systemSQLitePkgConfig: String? = "sqlite3"
68+
#endif
69+
6470
/** An array of products which have two versions listed: one dynamically linked, the other with the
6571
automatic linking type with `-auto` suffix appended to product's name.
6672
*/
@@ -143,7 +149,7 @@ let package = Package(
143149

144150
// MARK: SwiftPM specific support libraries
145151

146-
.systemLibrary(name: "SPMSQLite3", pkgConfig: "sqlite3"),
152+
.systemLibrary(name: "SPMSQLite3", pkgConfig: systemSQLitePkgConfig),
147153

148154
.target(
149155
name: "Basics",

0 commit comments

Comments
 (0)