我正在使用node-gyp构建node.js附加组件。 binding.gyp文件的内容是
{
'targets': [
{
'target_name': 'myapp',
'include_dirs': ['api-sdk'],
'sources': [ 'main.cpp', 'lib.cpp'],
'cflags!': [ '-fno-exceptions' ],
'cflags_cc!': [ '-fno-exceptions' ],
'conditions': [
['OS=="mac"', {
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
}
}]
]
}
]
}
在Windows上,当我运行node-gyp configure
时,会自动生成Visual Studio项目。但是在Mac上,它在执行node-gyp configure
之后不会生成相应的XCode项目。
有人知道如何使用Node-gyp生成XCode项目吗?我应该在binding.gyp文件中添加一些设置吗?
谢谢,
杰弗里
答案 0 :(得分:12)
在放置赏金后,我自己解决了......:)
node-gyp configure -- -f xcode
是这个问题的答案。