This project builds SQLite3 as a static library using the same SQLite compile options used by the TotalCross VM build.
It produces two variants:
plain: SQLite3 withoutSQLITE_HAS_CODECcrypto: SQLite3 withSQLITE_HAS_CODEC
All other SQLite compile definitions match the current TotalCross CMake build.
The build accepts one of these source inputs:
-DSQLITE3_SOURCE_DIR=/path/to/source-DSQLITE3_SOURCE_ARCHIVE=/path/to/sqlite.tar.gz-DSQLITE3_SOURCE_URL=https://.../sqlite.tar.gz
If none is provided, the plain upstream SQLite amalgamation
sqlite-amalgamation-3320300.zip is downloaded from sqlite.org.
The source directory or archive must contain exactly one sqlite3.c and one
sqlite3.h.
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DSQLITE3_VARIANT=plain
cmake --build build
cmake --install build --prefix build/installFor the crypto variant:
cmake -S . -B build-crypto -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DSQLITE3_VARIANT=crypto \
-DSQLITE3_SOURCE_ARCHIVE=/path/to/sqlite-see.tar.gz
cmake --build build-crypto
cmake --install build-crypto --prefix build-crypto/installThe helper script supports the cookie-based SQLite SEE login flow:
SQLITE_SEE_USER=... SQLITE_SEE_PASSWORD=... \
scripts/fetch-see.sh \
--url https://sqlite.org/see/tarball/sqlite_encryption_extension-20200618142025-7bff7d2607.tar.gz \
--output build/sqlite-see.tar.gzThe script validates the result with tar -tzf so an HTML login page fails
early.
Packaged artifacts use this layout:
sqlite3/
plain|crypto/
<platform>/<arch>/
include/
sqlite3.h
sqlite3ext.h
lib/
libsqlite3.a
manifest.txt