2023-01-11 13:23:51 +00:00
|
|
|
--- a/binding.gyp
|
|
|
|
+++ b/binding.gyp
|
|
|
|
@@ -7,7 +7,16 @@
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'better_sqlite3',
|
|
|
|
- 'dependencies': ['deps/sqlite3.gyp:sqlite3'],
|
2023-04-15 01:05:50 +00:00
|
|
|
+ 'include_dirs': [
|
|
|
|
+ '/usr/include/sqlcipher',
|
|
|
|
+ 'tokenizer',
|
|
|
|
+ ],
|
2023-01-11 13:23:51 +00:00
|
|
|
+ 'link_settings': {
|
|
|
|
+ 'libraries': [
|
|
|
|
+ '-lsqlcipher',
|
2023-04-15 01:05:50 +00:00
|
|
|
+ '<!(pwd)/tokenizer/libsignal_tokenizer.a',
|
2023-01-11 13:23:51 +00:00
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
'sources': ['src/better_sqlite3.cpp'],
|
|
|
|
'cflags_cc': ['-std=c++17'],
|
|
|
|
'xcode_settings': {
|
2023-04-15 01:05:50 +00:00
|
|
|
@@ -24,14 +33,22 @@
|
2023-01-11 13:23:51 +00:00
|
|
|
['OS=="linux"', {
|
|
|
|
'ldflags': [
|
|
|
|
'-Wl,-Bsymbolic',
|
|
|
|
- '-Wl,--exclude-libs,ALL',
|
|
|
|
],
|
|
|
|
}],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'test_extension',
|
|
|
|
- 'dependencies': ['deps/sqlite3.gyp:sqlite3'],
|
2023-04-15 01:05:50 +00:00
|
|
|
+ 'include_dirs': [
|
|
|
|
+ '/usr/include/sqlcipher',
|
|
|
|
+ 'tokenizer',
|
|
|
|
+ ],
|
2023-01-11 13:23:51 +00:00
|
|
|
+ 'link_settings': {
|
|
|
|
+ 'libraries': [
|
|
|
|
+ '-lsqlcipher',
|
2023-04-15 01:05:50 +00:00
|
|
|
+ '<!(pwd)/tokenizer/libsignal_tokenizer.a',
|
2023-01-11 13:23:51 +00:00
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
'conditions': [['sqlite3 == ""', { 'sources': ['deps/test_extension.c'] }]],
|
|
|
|
},
|
|
|
|
],
|
2023-04-15 01:05:50 +00:00
|
|
|
--- a/package.json
|
|
|
|
+++ b/package.json
|
|
|
|
@@ -34,7 +34,7 @@
|
|
|
|
"sqlite3": "^5.0.2"
|
|
|
|
},
|
|
|
|
"scripts": {
|
|
|
|
- "install": "npm run download && npm run build-release",
|
|
|
|
+ "install": "npm run build-release",
|
|
|
|
"build-release": "node-gyp rebuild --release",
|
|
|
|
"build-debug": "node-gyp rebuild --debug",
|
|
|
|
"rebuild-release": "npm run lzz && npm run build-release",
|