https://github.com/tayne3/sqlite3-cmake
π SQLite3 CMake wrapper
https://github.com/tayne3/sqlite3-cmake
cmake sqlite sqlite3
Last synced: about 2 months ago
JSON representation
π SQLite3 CMake wrapper
- Host: GitHub
- URL: https://github.com/tayne3/sqlite3-cmake
- Owner: tayne3
- License: mit
- Created: 2025-09-11T02:09:19.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2026-03-14T01:47:24.000Z (3 months ago)
- Last Synced: 2026-03-14T13:35:31.992Z (3 months ago)
- Topics: cmake, sqlite, sqlite3
- Language: CMake
- Homepage:
- Size: 2.58 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**English** | [δΈζ](README_zh.md)
sqlite3-cmake



[](https://deepwiki.com/tayne3/sqlite3-cmake)
A CMake wrapper for [SQLite3](https://www.sqlite.org/) amalgamation source code, providing easy integration with your C/C++ projects.
## Project Integration
#### Usage with [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html)
```cmake
cmake_minimum_required(VERSION 3.14)
project(example)
include(FetchContent)
FetchContent_Declare(sqlite3
GIT_REPOSITORY https://github.com/tayne3/sqlite3-cmake
GIT_TAG v3.50.4
)
FetchContent_MakeAvailable(sqlite3)
add_executable(example main.c)
target_link_libraries(example sqlite3::sqlite3)
```
#### Usage with [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake)
Use bundled SQLite3 source code:
```cmake
cmake_minimum_required(VERSION 3.14)
project(example)
if(NOT DEFINED ENV{CPM_SOURCE_CACHE})
set(ENV{CPM_SOURCE_CACHE} ${CMAKE_SOURCE_DIR}/cmake_modules)
endif()
include(cmake/CPM.cmake)
CPMAddPackage("gh:tayne3/sqlite3-cmake@3.51.2")
add_executable(example main.c)
target_link_libraries(example sqlite3::sqlite3)
```
Use specified version of SQLite3 source code:
```cmake
cmake_minimum_required(VERSION 3.14)
project(example)
if(NOT DEFINED ENV{CPM_SOURCE_CACHE})
set(ENV{CPM_SOURCE_CACHE} ${CMAKE_SOURCE_DIR}/cmake_modules)
endif()
include(cmake/CPM.cmake)
CPMAddPackage(
NAME sqlite3
URI "gh:tayne3/sqlite3-cmake@3.51.2"
OPTIONS "SQLITE3_EXTERNAL_URL https://www.sqlite.org/2025/sqlite-amalgamation-3490100.zip"
"SQLITE3_EXTERNAL_HASH SHA3_256=e7eb4cfb2d95626e782cfa748f534c74482f2c3c93f13ee828b9187ce05b2da7"
)
add_executable(example main.c)
target_link_libraries(example sqlite3::sqlite3)
```