-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76ca486
commit 25dad15
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
cmake_minimum_required(VERSION 3.14 FATAL_ERROR) | ||
|
||
project(CPMSqliteExample) | ||
|
||
# ---- Dependencies ---- | ||
|
||
include(../../cmake/CPM.cmake) | ||
|
||
# sqlite - You know it, you love it! | ||
CPMAddPackage( | ||
NAME sqlite | ||
URL https://www.sqlite.org/2024/sqlite-amalgamation-3460000.zip | ||
URL_HASH SHA256=712a7d09d2a22652fb06a49af516e051979a3984adb067da86760e60ed51a7f5 | ||
PATCHES | ||
sqlite.patch | ||
) | ||
|
||
add_executable(CPMSqliteExample main.cpp) | ||
target_link_libraries(CPMSqliteExample sqlite) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include <iostream> | ||
#include <sqlite3.h> | ||
|
||
|
||
int main(int,char**) { | ||
std::cout << sqlite3_libversion() << "\n"; | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
diff -uN a/CMakeLists.txt b/CMakeLists.txt | ||
--- a/CMakeLists.txt 1969-12-31 18:00:00.000000000 -0600 | ||
+++ b/CMakeLists.txt 2024-07-30 12:22:59.022590360 -0500 | ||
@@ -0,0 +1,7 @@ | ||
+cmake_minimum_required(VERSION 3.11) | ||
+project(sqlite) | ||
+ | ||
+add_library(sqlite STATIC sqlite3.c sqlite3.h sqlite3ext.h) | ||
+target_include_directories(sqlite PUBLIC SYSTEM | ||
+ "${CMAKE_CURRENT_SOURCE_DIR}" | ||
+) |