GithubHelp home page GithubHelp logo

geode-solutions / sqlite-amalgamation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azadkuh/sqlite-amalgamation

0.0 2.0 0.0 15.97 MB

The SQLite amalgamation mirror with cmake

Home Page: http://www.sqlite.org/amalgamation.html

License: BSD 3-Clause "New" or "Revised" License

C 99.94% CMake 0.06%

sqlite-amalgamation's Introduction

sqlite-amalgamation

This repository mirrors the SQLite amalgamation, which is the recommended method of building SQLite into larger projects. It also supports cmake for building, installing and exporting.

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.

SQLite3

build / install

A static lib (libsqlite3) and the sqlite3 shell will be generated by the build system.

$> mkdir .build
$> cd .build
$> cmake /path/to/this/repo  # or cmake .. -G Ninja
$> ccmake .                  # for build options or cmake-gui .
$> make -j 2                 # or ninja

$> make install

usage

to integrate this library into your project simply add these lines to your project cmake:

find_package(SQLite3 REQUIRED CONFIG)
target_link_libraries(${PROJECT_NAME} SQLite::SQLite3)

the include directory and link library will be automatically added to your target. If you need to switch your project to use "standard" SQLite remove CONFIG option in find_package function call.

SQLite3 build options

SQLite3 comes with plenty of compile options

following cmake build options control some of those compile options:

options default
SQLITE_ENABLE_COLUMN_METADATA off
SQLITE_ENABLE_DBSTAT_VTAB off
SQLITE_ENABLE_FTS3 off
SQLITE_ENABLE_FTS4 off
SQLITE_ENABLE_FTS5 off
SQLITE_ENABLE_GEOPOLY off
SQLITE_ENABLE_ICU off
SQLITE_ENABLE_MATH_FUNCTIONS on
SQLITE_ENABLE_RBU off
SQLITE_ENABLE_RTREE off
SQLITE_ENABLE_STAT4 off
SQLITE_OMIT_DECLTYPE on
SQLITE_OMIT_JSON off
SQLITE_USE_URI off

these recommended compile options are also passed to the compiler by SQLITE_RECOMMENDED_OPTIONS (on by default):

options
SQLITE_DEFAULT_MEMSTATUS = 0
SQLITE_DEFAULT_WAL_SYNCHRONOUS = 1
SQLITE_DQS = 0
SQLITE_LIKE_DOESNT_MATCH_BLOBS
SQLITE_MAX_EXPR_DEPTH = 0
SQLITE_OMIT_DECLTYPE
SQLITE_OMIT_DEPRECATED
SQLITE_OMIT_PROGRESS_CALLBACK
SQLITE_OMIT_SHARED_CACHE
SQLITE_USE_ALLOCA

all compile-time options will go into sqlite3_config.h, you may use this file to check these options when building your application.

the SQLite3 shell (executable) is disabled by default, to build it just activate the BUILD_SHELL option.

sqlite-amalgamation's People

Contributors

azadkuh avatar botellaa avatar jschueller avatar integrallee avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.