Commit 9f78d27
fix: replace CSQLite systemLibrary with proper C target for Android/Linux
Converts CSQLite from a .systemLibrary (which required an absolute path
to sqlite3.h and relied on pkg-config) to a proper C .target that uses
an umbrella header with '#include <sqlite3.h>' (angle-bracket search).
Why this works everywhere:
- macOS: CSQLite not used — Swift imports SQLite3 framework directly
- Linux: '#include <sqlite3.h>' resolves via system include path
(libsqlite3-dev installs /usr/include/sqlite3.h)
- Android: '--swift-sdk aarch64-unknown-linux-android24' sets NDK sysroot;
sqlite3.h is a public NDK API since API 5, found at
$(SYSROOT)/usr/include/sqlite3.h automatically
The old .systemLibrary approach failed on Android because:
- pkg-config is not available in the cross-compilation environment
- The absolute path '/usr/include/sqlite3.h' does not exist in the sysroot
- The relative path 'sqlite3.h' was not found without pkg-config flags
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent dc8cb70 commit 9f78d27
5 files changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | | - | |
12 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
13 | 20 | | |
14 | 21 | | |
15 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
0 commit comments