Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
// swift-tools-version: 6.0
import PackageDescription
import Foundation

var toolchainCSettings: [CSetting] = []
if ProcessInfo.processInfo.environment["SQLITE_ENABLE_FTS5"] == "1" {
toolchainCSettings.append(.define("SQLITE_ENABLE_FTS5"))
}

let package = Package(
name: "swift-toolchain-sqlite",
Expand Down Expand Up @@ -37,6 +43,7 @@ let package = Package(
name: "SwiftToolchainCSQLite",
path: "Sources/CSQLite",
publicHeadersPath: "include",
cSettings: toolchainCSettings,
linkerSettings: [
// Needed for swift_addNewDSOImage
.linkedLibrary("swiftCore", .when(platforms: [.windows, .wasi]))
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ It is not intended as a general-purpose SQLite package, nor does it aim to provi
This build of this package has been validated for macOS, iOS, tvOS, watchOS, visionOS, Mac Catalyst, Linux, Android, Windows, WebAssembly, and FreeBSD.
On most platforms, the Swift toolchain uses a copy of SQLite provided by the platform SDK or package manager instead of this package.

### Compile-time Options

Set the following environment variables to enable the corresponding compile-time options.

- `SQLITE_ENABLE_FTS5=1` to enable [FTS5](https://www.sqlite.org/fts5.html)

Contributing to /swift-toolchain-sqlite
-------------
Expand Down