forked from zoubingwu/better-sqlite3-sqlcipher
-
Notifications
You must be signed in to change notification settings - Fork 1
/
binding.gyp
69 lines (68 loc) · 1.7 KB
/
binding.gyp
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
# ===
# This is the main GYP file, which builds better-sqlite3 with SQLite3 itself.
# ===
{
'includes': ['deps/common.gypi'],
'conditions': [
['OS == "win"', {
'variables': {
'path_static_libcrypto': '<(module_root_dir)/openssl/1.0.2s/<(OS)_<(target_arch)/lib/libcrypto.dll.a',
}
},{
'variables': {
'path_static_libcrypto': '<(module_root_dir)/openssl/1.0.2s/<(OS)_<(target_arch)/lib/libcrypto.a',
}
}],
],
'targets': [
{
'target_name': 'better_sqlite3',
'dependencies': ['deps/sqlite3.gyp:sqlite3'],
'libraries': [
'<(path_static_libcrypto)',
],
'sources': ['src/better_sqlite3.cpp'],
'cflags': [
'-std=c++11',
],
'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'-std=c++11',
'-stdlib=libc++',
],
},
},
{
'target_name': 'place_resulting_binaries',
'type': 'none',
'dependencies': ['better_sqlite3'],
'conditions': [
['OS == "win"', {
'copies': [{
'files': [
'<(module_root_dir)/openssl/1.0.2s/<(OS)_<(target_arch)/bin/libeay32.dll'
],
'destination': 'build',
}],
'conditions': [
['target_arch == "ia32"', {
'copies': [{
'files': [
'<(module_root_dir)/dll/libgcc_s_dw2-1.dll'
],
'destination': 'build',
}],
}],
]
}]
],
'copies': [{
'files': [
'<(PRODUCT_DIR)/better_sqlite3.node',
'<(path_static_libcrypto)',
],
'destination': 'build',
}],
},
],
}