-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinding.gyp
More file actions
82 lines (80 loc) · 2.09 KB
/
binding.gyp
File metadata and controls
82 lines (80 loc) · 2.09 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
73
74
75
76
77
78
79
80
81
82
# The documentation available for node-gyp is perhaps not as comprehensive
# and well-organized as it could be. The following articles were referenced
# during the construction of this file:
#
# https://gyp.gsrc.io/docs/LanguageSpecification.md
# https://gyp.gsrc.io/docs/UserDocumentation.md
# https://web.archive.org/web/20160430013351/https://n8.io/converting-a-c-library-to-gyp/
{
'target_defaults': {
'configurations': {
'Debug': {},
'Release': {
'defines': ['NDEBUG'],
},
},
},
'targets': [
{
'target_name': 'sqlite',
'product_prefix': 'lib',
'type': 'static_library',
'conditions': [
# Disable SQLite warnings for GCC-style (i.e. non-MSVC) compilers
['OS!="win"', {
'cflags': [
'-Wno-cast-function-type',
'-Wno-implicit-fallthrough',
],
}],
],
'defines': [
# Recommendations from https://www.sqlite.org/compile.html
# a/o 2019-12-01
'SQLITE_DQS=0',
'SQLITE_THREADSAFE=0',
'SQLITE_DEFAULT_MEMSTATUS=0',
'SQLITE_DEFAULT_WAL_SYNCHRONOUS=1',
'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',
# Executive decisions
'SQLITE_DEFAULT_FOREIGN_KEYS=1',
'SQLITE_ENABLE_STAT4'
],
'include_dirs': [
'native/sqlite',
],
'sources': [
'native/sqlite/sqlite3.c',
],
},
{
'target_name': 'nsql',
'dependencies': [
'sqlite'
],
'defines': [
'NAPI_VERSION=6'
],
'include_dirs': [
'native/sqlite',
'native/nsql',
],
'sources': [
'native/nsql/bind.c',
'native/nsql/database.c',
'native/nsql/dprintf.c',
'native/nsql/error.c',
'native/nsql/module.c',
'native/nsql/result.c',
'native/nsql/statement.c',
'native/nsql/str.c',
]
}
]
}