diff options
Diffstat (limited to 'templates/binding.gyp.template')
-rw-r--r-- | templates/binding.gyp.template | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index b7560fe7df..b1e1374249 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -165,19 +165,21 @@ }], ['OS == "mac"', { 'xcode_settings': { - 'MACOSX_DEPLOYMENT_TARGET': '10.9' + % if defaults['global'].get('CPPFLAGS', None) is not None: + 'OTHER_CFLAGS': [ + % for item in defaults['global'].get('CPPFLAGS').split(): + '${item}', + % endfor + ], + 'OTHER_CPLUSPLUSFLAGS': [ + % for item in defaults['global'].get('CPPFLAGS').split(): + '${item}', + % endfor + '-stdlib=libc++', + '-std=c++11' + ], + % endif }, - % if defaults['global'].get('CPPFLAGS', None) is not None: - 'OTHER_CFLAGS': [ - % for item in defaults['global'].get('CPPFLAGS').split(): - '${item}', - % endfor - ], - 'OTHER_CPLUSPLUSFLAGS': [ - '-stdlib=libc++', - '-std=c++11' - ], - % endif }] ] }, @@ -201,6 +203,13 @@ '${source}', % endfor ], + 'conditions': [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } + }] + ] }, % endif % endfor @@ -282,6 +291,13 @@ '${source}', % endfor ], + 'conditions': [ + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } + }] + ] }, % endif % endfor @@ -317,6 +333,11 @@ 'ldflags': [ '-Wl,-wrap,memcpy' ] + }], + ['OS == "mac"', { + 'xcode_settings': { + 'MACOSX_DEPLOYMENT_TARGET': '10.9' + } }] ], "target_name": "${module.name}", |