-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcompat.sqlitecpp.lua
More file actions
72 lines (70 loc) · 3.26 KB
/
Copy pathcompat.sqlitecpp.lua
File metadata and controls
72 lines (70 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
-- compat.sqlitecpp — SQLiteCpp, a thin RAII C++ wrapper over the SQLite C API.
-- A consumer writes `#include <SQLiteCpp/SQLiteCpp.h>`.
--
-- Shape A, with the one interesting bit being where SQLite comes from.
--
-- Upstream vendors sqlite3 as a GIT SUBMODULE, and a source tarball carries no
-- submodules — so `sqlite3/sqlite3.c` simply is not in the archive and the
-- library would not link. The dependency edge on `compat.sqlite3` replaces it,
-- which is also the better arrangement: two consumers of SQLite in one link now
-- share ONE amalgamation rather than each embedding a private copy with its own
-- compile-time options.
--
-- WHAT IS NOT COMPILED. `src/` holds exactly the wrapper's 11 TUs and nothing
-- else, so the glob needs no trimming. Upstream's `tests/`, `examples/` and the
-- `googletest/` submodule are elsewhere in the tree.
--
-- COMPILE OPTIONS ARE DELIBERATELY ABSENT. SQLiteCpp's CMake offers
-- SQLITECPP_USE_ASSERT_ON_ERRORS (aborts the process on a misused API instead of
-- throwing) and SQLITE_ENABLE_COLUMN_METADATA (adds Column::getOriginName and
-- friends, and requires the SAME define when SQLite itself was built). Neither
-- is something a package should decide for its consumers: the first changes the
-- error model, the second has to agree with compat.sqlite3's build. The headers
-- guard both with #ifdef, so a consumer that wants either declares it — and for
-- the metadata one, must also build SQLite with it.
package = {
spec = "1",
namespace = "compat",
name = "sqlitecpp",
description = "SQLiteCpp: a smart and easy to use C++ SQLite3 wrapper",
licenses = {"MIT"},
repo = "https://github.com/SRombauts/SQLiteCpp",
type = "package",
xpm = {
linux = {
["3.3.3"] = {
url = {
GLOBAL = "https://github.com/SRombauts/SQLiteCpp/archive/refs/tags/3.3.3.tar.gz",
CN = "https://gitcode.com/mcpp-res/sqlitecpp/releases/download/3.3.3/sqlitecpp-3.3.3.tar.gz",
},
sha256 = "33bd4372d83bc43117928ee842be64d05e7807f511b5195f85d30015cad9cac6",
},
},
macosx = {
["3.3.3"] = {
url = {
GLOBAL = "https://github.com/SRombauts/SQLiteCpp/archive/refs/tags/3.3.3.tar.gz",
CN = "https://gitcode.com/mcpp-res/sqlitecpp/releases/download/3.3.3/sqlitecpp-3.3.3.tar.gz",
},
sha256 = "33bd4372d83bc43117928ee842be64d05e7807f511b5195f85d30015cad9cac6",
},
},
windows = {
["3.3.3"] = {
url = {
GLOBAL = "https://github.com/SRombauts/SQLiteCpp/archive/refs/tags/3.3.3.tar.gz",
CN = "https://gitcode.com/mcpp-res/sqlitecpp/releases/download/3.3.3/sqlitecpp-3.3.3.tar.gz",
},
sha256 = "33bd4372d83bc43117928ee842be64d05e7807f511b5195f85d30015cad9cac6",
},
},
},
mcpp = {
language = "c++23",
import_std = false,
include_dirs = { "*/include" },
sources = { "*/src/*.cpp" },
targets = { ["SQLiteCpp"] = { kind = "lib" } },
deps = { ["compat.sqlite3"] = "3.45.3" },
},
}