2017-03-07 22:24:30 +00:00
|
|
|
{
|
|
|
|
"variables": {
|
|
|
|
"use_realm_debug%": "<!(node -p \"'REALMJS_USE_DEBUG_CORE' in process.env ? 1 : 0\")"
|
|
|
|
},
|
|
|
|
"conditions": [
|
|
|
|
["OS=='mac'", {
|
|
|
|
"variables": {
|
|
|
|
"realm_enable_sync%": "1"
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
"variables": {
|
|
|
|
"realm_enable_sync%": "0"
|
|
|
|
}
|
|
|
|
}],
|
2017-07-12 00:11:49 +00:00
|
|
|
["use_realm_debug", {
|
|
|
|
"variables": {
|
|
|
|
"debug_library_suffix": "-dbg"
|
|
|
|
}
|
2017-03-07 22:24:30 +00:00
|
|
|
}, {
|
|
|
|
"variables": {
|
2017-07-12 00:11:49 +00:00
|
|
|
"debug_library_suffix": ""
|
2017-03-07 22:24:30 +00:00
|
|
|
}
|
|
|
|
}]
|
|
|
|
],
|
|
|
|
"targets": [
|
|
|
|
{
|
|
|
|
"target_name": "realm-core",
|
|
|
|
"type": "none",
|
|
|
|
"direct_dependent_settings": {
|
2017-07-12 00:11:49 +00:00
|
|
|
"libraries": [ "-lrealm<(debug_library_suffix)" ],
|
2017-03-07 22:24:30 +00:00
|
|
|
"conditions": [
|
|
|
|
["use_realm_debug", {
|
2017-07-12 00:11:49 +00:00
|
|
|
"defines": [ "REALM_DEBUG=1" ]
|
2017-03-07 22:24:30 +00:00
|
|
|
}]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"variables": {
|
|
|
|
"prefix": "<!(node -p \"process.env.REALM_CORE_PREFIX || String()\")"
|
|
|
|
},
|
|
|
|
"conditions": [
|
|
|
|
["prefix!=''", {
|
|
|
|
"all_dependent_settings": {
|
|
|
|
"include_dirs": [ "<(prefix)/src" ],
|
|
|
|
},
|
|
|
|
"direct_dependent_settings": {
|
|
|
|
"library_dirs": [ "<(prefix)/src/realm" ]
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
"dependencies": [ "vendored-realm" ]
|
|
|
|
}],
|
|
|
|
["OS=='win'", {
|
2017-07-12 00:11:49 +00:00
|
|
|
"direct_dependent_settings": {
|
|
|
|
"libraries": [ "-lsha_win32<(debug_library_suffix)" ]
|
2017-03-07 22:24:30 +00:00
|
|
|
}
|
|
|
|
}]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"target_name": "realm-sync",
|
|
|
|
"type": "none",
|
2017-07-12 00:11:49 +00:00
|
|
|
"dependencies": [ "realm-core" ],
|
2017-03-07 22:24:30 +00:00
|
|
|
"direct_dependent_settings": {
|
2017-07-12 00:11:49 +00:00
|
|
|
"libraries": [ "-lrealm-sync-node<(debug_library_suffix)" ]
|
|
|
|
},
|
|
|
|
"all_dependent_settings": {
|
|
|
|
"defines": [ "REALM_ENABLE_SYNC=1" ]
|
2017-03-07 22:24:30 +00:00
|
|
|
},
|
|
|
|
"export_dependent_settings": [ "realm-core" ], # depending on sync is tantamount to depending on core
|
|
|
|
"variables": {
|
|
|
|
"prefix": "<!(node -p \"process.env.REALM_SYNC_PREFIX || String()\")"
|
|
|
|
},
|
|
|
|
"conditions": [
|
|
|
|
["prefix!=''", {
|
2017-07-12 00:11:49 +00:00
|
|
|
"all_dependent_settings+": {
|
2017-03-07 22:24:30 +00:00
|
|
|
"include_dirs": [ "<(prefix)/src" ],
|
|
|
|
},
|
2017-07-12 00:11:49 +00:00
|
|
|
"direct_dependent_settings+": {
|
2017-03-07 22:24:30 +00:00
|
|
|
"library_dirs": [ "<(prefix)/src/realm" ]
|
|
|
|
}
|
|
|
|
}, {
|
2017-07-12 00:11:49 +00:00
|
|
|
"dependencies+": [ "vendored-realm" ]
|
2017-03-07 22:24:30 +00:00
|
|
|
}]
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"variables": {
|
2017-07-12 00:11:49 +00:00
|
|
|
"vendor_dir%": "<(module_root_dir)/vendor/realm-<(OS)-<(target_arch)<(debug_library_suffix)"
|
2017-03-07 22:24:30 +00:00
|
|
|
},
|
|
|
|
"target_name": "vendored-realm",
|
|
|
|
"type": "none",
|
|
|
|
"all_dependent_settings": {
|
2017-07-12 00:11:49 +00:00
|
|
|
"include_dirs": [ "<(vendor_dir)/include" ],
|
2017-03-07 22:24:30 +00:00
|
|
|
"library_dirs": [
|
2017-07-12 00:11:49 +00:00
|
|
|
"<(vendor_dir)/lib",
|
|
|
|
"<(vendor_dir)/osx"
|
2017-03-07 22:24:30 +00:00
|
|
|
]
|
|
|
|
},
|
2017-07-05 15:18:04 +00:00
|
|
|
"conditions": [
|
2017-07-12 00:11:49 +00:00
|
|
|
["use_realm_debug", {
|
|
|
|
"variables": { "download_realm_debug_flag": "--debug" }
|
|
|
|
}, {
|
|
|
|
"variables": { "download_realm_debug_flag": "" }
|
|
|
|
}],
|
|
|
|
["realm_enable_sync", {
|
|
|
|
"variables": { "download_realm_sync_flag": "--sync" }
|
|
|
|
}, {
|
|
|
|
"variables": { "download_realm_sync_flag": "" }
|
|
|
|
}],
|
2017-07-05 15:18:04 +00:00
|
|
|
["realm_download_binaries", {
|
|
|
|
"actions": [
|
|
|
|
{
|
|
|
|
"action_name": "download-realm",
|
|
|
|
"inputs": [ "<(module_root_dir)/scripts/download-realm.js" ],
|
2017-07-12 00:11:49 +00:00
|
|
|
"outputs": [ "<(vendor_dir)" ],
|
|
|
|
"action": [ "node", "<(module_root_dir)/scripts/download-realm.js", "<(OS)", ">(download_realm_debug_flag)", ">(download_realm_sync_flag)", "--arch=<(target_arch)" ]
|
2017-07-05 15:18:04 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}]
|
2017-03-07 22:24:30 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|