Repository navigation
Expand file tree
/
Copy pathPackage.swift
More file actions
49 lines (48 loc) · 1.72 KB
/
Copy pathPackage.swift
File metadata and controls
49 lines (48 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// swift-tools-version: 6.2
import PackageDescription
let package = Package(
name: "PerfectSQLite",
platforms: [.macOS(.v12), .iOS(.v15)],
products: [
.library(name: "PerfectSQLite", targets: ["PerfectSQLite"]),
],
dependencies: [
.package(url: "https://github.com/PerfectlySoft/Perfect-CRUD.git", from: "3.0.1"),
],
targets: [
// System SQLite for Linux, which has no SQLite3 module like Apple's SDK.
// Apple platforms keep importing SQLite3 (see `#if canImport(SQLite3)`).
// Prefixed name: target names must be unique across a package graph,
// and plain `CSQLite` is common.
.systemLibrary(
name: "PerfectCSQLite",
pkgConfig: "sqlite3",
providers: [
.apt(["libsqlite3-dev"]),
.yum(["sqlite-devel"]),
]
),
// C wrappers for SQLite calls Swift can't import (variadic sqlite3_db_config).
.target(
name: "PerfectSQLiteShim",
dependencies: [
.target(name: "PerfectCSQLite", condition: .when(platforms: [.linux])),
],
linkerSettings: [.linkedLibrary("sqlite3")]
),
.target(
name: "PerfectSQLite",
dependencies: [
.product(name: "PerfectCRUD", package: "Perfect-CRUD"),
.target(name: "PerfectCSQLite", condition: .when(platforms: [.linux])),
"PerfectSQLiteShim",
],
swiftSettings: [.swiftLanguageMode(.v6)]
),
.testTarget(
name: "PerfectSQLiteTests",
dependencies: ["PerfectSQLite"],
swiftSettings: [.swiftLanguageMode(.v6)]
),
]
)