This repository mirrors the SQLite
amalgamation, provided in order to be included in git submodule/subtree
or
other git
based, custom dependency managers.
It also comes with a cmake
build script to easily make the library and the shell
application.
SQLite includes more than 100 files in *.c
/ *.h
, but
The amalgamation contains everything you need to integrate SQLite into a larger project. Just copy the amalgamation into your source directory and compile it along with the other C code files in your project. (A more detailed > discussion of the > compilation process is available.) You may also want to make use of the "sqlite3.h" header file that defines the programming API for SQLite. The sqlite3.h header file is available separately. The sqlite3.h file is also contained within the amalgamation, in the first few thousand lines. So if you have a copy of sqlite3.c but cannot seem to locate sqlite3.h, you can always regenerate the sqlite3.h by copying and pasting from the amalgamation.
A static lib (libsqlite3
) and the sqlite3 shell will be generated by the build
system.
# under Linux / OS X
$> mkdir .build
$> cd .build
$> cmake .. # or cmake .. -G Ninja
$> make -j 2 # or ninja
# under Windows
$> mkdir .build
$> cd .build
$> cmake ..
$> cmake --build . --config Release -- /v:m
building of the shell application is disabled by default, to make it:
$> cmake .. -DBUILD_SHELL=ON
by gcc
and clang
it's also possible to build sqlite3 as a shared library
by cmake
:
# on gcc or clang (Linux or OS X)
$> cmake .. -DBUILD_SHARED_LIBS=ON
SQLite
comes with a plenty of compile options, you can choose some of these
options:
BUILD_ENABLE_DBSTAT_VTAB
BUILD_ENABLE_FTS3
BUILD_ENABLE_FTS5
BUILD_ENABLE_ICU
BUILD_ENABLE_JSON1
BUILD_ENABLE_RBU
BUILD_ENABLE_RTREE
by:
# shell: Linux / OS X
$> ccmake .
# gui: Linux / OS X / Windows
$> cmake-gui .
for more information please have a look at Compilation Options For SQLite