1 | {
|
2 | "includes": [ "deps/common-sqlite.gypi" ],
|
3 | "variables": {
|
4 | "sqlite%":"internal",
|
5 | "sqlite_libname%":"sqlite3",
|
6 | "module_name": "node_sqlite3",
|
7 | },
|
8 | "targets": [
|
9 | {
|
10 | "target_name": "<(module_name)",
|
11 | "cflags!": [ "-fno-exceptions" ],
|
12 | "cflags_cc!": [ "-fno-exceptions" ],
|
13 | "xcode_settings": { "GCC_ENABLE_CPP_EXCEPTIONS": "YES",
|
14 | "CLANG_CXX_LIBRARY": "libc++",
|
15 | "MACOSX_DEPLOYMENT_TARGET": "10.7",
|
16 | },
|
17 | "msvs_settings": {
|
18 | "VCCLCompilerTool": { "ExceptionHandling": 1 },
|
19 | },
|
20 | "include_dirs": [
|
21 | "<!@(node -p \"require('node-addon-api').include\")"],
|
22 | "conditions": [
|
23 | ["sqlite != 'internal'", {
|
24 | "include_dirs": [
|
25 | "<!@(node -p \"require('node-addon-api').include\")", "<(sqlite)/include" ],
|
26 | "libraries": [
|
27 | "-l<(sqlite_libname)"
|
28 | ],
|
29 | "conditions": [
|
30 | [ "OS=='linux'", {"libraries+":["-Wl,-rpath=<@(sqlite)/lib"]} ],
|
31 | [ "OS!='win'", {"libraries+":["-L<@(sqlite)/lib"]} ]
|
32 | ],
|
33 | 'msvs_settings': {
|
34 | 'VCLinkerTool': {
|
35 | 'AdditionalLibraryDirectories': [
|
36 | '<(sqlite)/lib'
|
37 | ],
|
38 | },
|
39 | }
|
40 | },
|
41 | {
|
42 | "dependencies": [
|
43 | "<!(node -p \"require('node-addon-api').gyp\")",
|
44 | "deps/sqlite3.gyp:sqlite3"
|
45 | ]
|
46 | }
|
47 | ]
|
48 | ],
|
49 | "sources": [
|
50 | "src/backup.cc",
|
51 | "src/database.cc",
|
52 | "src/node_sqlite3.cc",
|
53 | "src/statement.cc"
|
54 | ],
|
55 | "defines": [ "NAPI_VERSION=<(napi_build_version)", "NAPI_DISABLE_CPP_EXCEPTIONS=1" ]
|
56 | }
|
57 | ]
|
58 | }
|