|
2 | 2 | import PackageDescription |
3 | 3 |
|
4 | 4 | let package = Package( |
5 | | - name: "swift-toolchain-sqlite", |
6 | | - products: [ |
7 | | - .executable( |
8 | | - name: "sqlite", |
9 | | - targets: ["sqlite"]), |
10 | | - .library( |
11 | | - name: "SwiftToolchainCSQLite", |
12 | | - targets: ["SwiftToolchainCSQLite"]), |
13 | | - ], |
14 | | - targets: [ |
15 | | - .executableTarget( |
16 | | - name: "sqlite", |
17 | | - dependencies: ["SwiftToolchainCSQLite"], |
18 | | - cSettings: [ |
19 | | - .define("SQLITE_OMIT_LOAD_EXTENSION"), |
20 | | - .define("SQLITE_NOHAVE_SYSTEM", .when(platforms: [.macCatalyst, .iOS, .tvOS, .watchOS, .visionOS, .wasi])), |
21 | | - .define("HAVE_READLINE", .when(platforms: [.macOS, .macCatalyst])), |
22 | | - .define("_WASI_EMULATED_SIGNAL", .when(platforms: [.wasi])), |
23 | | - .define("_WASI_EMULATED_PROCESS_CLOCKS", .when(platforms: [.wasi])), |
24 | | - .define("_WASI_EMULATED_GETPID", .when(platforms: [.wasi])), |
25 | | - .define("chmod(a,b)=0", .when(platforms: [.wasi])), |
26 | | - ], |
27 | | - linkerSettings: [ |
28 | | - .linkedLibrary("wasi-emulated-signal", .when(platforms: [.wasi])), |
29 | | - .linkedLibrary("wasi-emulated-process-clocks", .when(platforms: [.wasi])), |
30 | | - .linkedLibrary("wasi-emulated-getpid", .when(platforms: [.wasi])), |
31 | | - ] |
32 | | - ), |
33 | | - .target( |
34 | | - name: "SwiftToolchainCSQLite", |
35 | | - path: "Sources/CSQLite", |
36 | | - publicHeadersPath: "include", |
37 | | - linkerSettings: [ |
38 | | - // Needed for swift_addNewDSOImage |
39 | | - .linkedLibrary("swiftCore", .when(platforms: [.windows, .wasi])) |
40 | | - ] |
41 | | - ), |
42 | | - ] |
| 5 | + name: "swift-toolchain-sqlite", |
| 6 | + products: [ |
| 7 | + .executable( |
| 8 | + name: "sqlite", |
| 9 | + targets: ["sqlite"]), |
| 10 | + .library( |
| 11 | + name: "SwiftToolchainCSQLite", |
| 12 | + targets: ["SwiftToolchainCSQLite"]), |
| 13 | + ], |
| 14 | + targets: [ |
| 15 | + .executableTarget( |
| 16 | + name: "sqlite", |
| 17 | + dependencies: ["SwiftToolchainCSQLite"], |
| 18 | + cSettings: [ |
| 19 | + .define("SQLITE_OMIT_LOAD_EXTENSION"), |
| 20 | + .define( |
| 21 | + "SQLITE_NOHAVE_SYSTEM", |
| 22 | + .when(platforms: [.macCatalyst, .iOS, .tvOS, .watchOS, .visionOS, .wasi])), |
| 23 | + .define("HAVE_READLINE", .when(platforms: [.macOS, .macCatalyst])), |
| 24 | + .define("_WASI_EMULATED_SIGNAL", .when(platforms: [.wasi])), |
| 25 | + .define("_WASI_EMULATED_PROCESS_CLOCKS", .when(platforms: [.wasi])), |
| 26 | + .define("_WASI_EMULATED_GETPID", .when(platforms: [.wasi])), |
| 27 | + .define("chmod(a,b)=0", .when(platforms: [.wasi])), |
| 28 | + ], |
| 29 | + linkerSettings: [ |
| 30 | + .linkedLibrary("wasi-emulated-signal", .when(platforms: [.wasi])), |
| 31 | + .linkedLibrary("wasi-emulated-process-clocks", .when(platforms: [.wasi])), |
| 32 | + .linkedLibrary("wasi-emulated-getpid", .when(platforms: [.wasi])), |
| 33 | + ] |
| 34 | + ), |
| 35 | + .target( |
| 36 | + name: "SwiftToolchainCSQLite", |
| 37 | + path: "Sources/CSQLite", |
| 38 | + publicHeadersPath: "include", |
| 39 | + linkerSettings: [ |
| 40 | + // Needed for swift_addNewDSOImage |
| 41 | + .linkedLibrary("swiftCore", .when(platforms: [.windows, .wasi])) |
| 42 | + ] |
| 43 | + ), |
| 44 | + ] |
43 | 45 | ) |
0 commit comments