Created
November 7, 2018 16:56
-
-
Save gabrielschulhof/7a7a30c9d83308d903e1fccf12614244 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'variables': { | |
'node_iconv_use_system_libiconv%': 0, | |
}, | |
'targets': [ | |
{ | |
'target_name': 'iconv', | |
'include_dirs': ["<!@(node -p \"require('node-addon-api').include\")"], | |
'sources': ['src/binding.cc'], | |
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ], | |
'ccflags': [ | |
'-Wall', | |
'-Wextra', | |
'-Wno-unused-parameter', # Squelches warnings coming from v8.h. | |
'-fno-exceptions', | |
'-fno-rtti', | |
], | |
# Have to repeat flags on mac because of gyp's xcode emulation "feature". | |
'xcode_settings': { | |
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', | |
'GCC_ENABLE_CPP_RTTI': 'NO', | |
'WARNING_CFLAGS': ['-Wall', '-Wextra', '-Wno-unused-parameter'], | |
}, | |
'conditions': [ | |
['node_iconv_use_system_libiconv==0', { | |
'defines': ['ICONV_CONST=const', 'ENABLE_EXTRA=1'], | |
'include_dirs': ['support'], | |
'sources': [ | |
'deps/libiconv/lib/iconv.c', | |
'support/localcharset.c', | |
], | |
'cflags!': ['-W', '-Wall', '-Wextra'], | |
'msvs_settings': { | |
'VCCLCompilerTool': { | |
'DisableSpecificWarnings': [ | |
'4018', # Signed/unsigned comparison. | |
'4090', # Const/non-const mismatch. | |
'4244', # Narrowing cast. | |
'4267', # Narrowing cast. | |
], | |
}, | |
}, | |
'xcode_settings': { | |
'WARNING_CFLAGS!': ['-W', '-Wall', '-Wextra'], | |
'WARNING_CFLAGS': [ | |
'-Wno-parentheses-equality', | |
'-Wno-static-in-inline', | |
'-Wno-tautological-compare', | |
], | |
}, | |
}], | |
], | |
}, | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment