Skip to content

Instantly share code, notes, and snippets.

@malyn
Created July 10, 2012 02:03
Show Gist options
  • Save malyn/3080523 to your computer and use it in GitHub Desktop.
Save malyn/3080523 to your computer and use it in GitHub Desktop.
malyn/node-midi binding.gyp with Mac OS X framework libraries
{
'targets': [
{
'target_name': 'midi',
'include_dirs': [
'src'
],
'sources': [
'src/node-midi.cpp'
],
'conditions': [
['OS=="linux"',
{
'cflags_cc!': [
'-fno-exceptions'
],
'defines': [
'__LINUX_ALSASEQ__'
],
'link_settings': {
'libraries': [
'-lasound',
'-lpthread',
]
}
}
],
['OS=="mac"',
{
'defines': [
'__MACOSX_CORE__'
],
'link_settings': {
'libraries': [
'-framework', 'CoreMidi',
'-framework', 'CoreAudio',
'-framework', 'CoreFoundation',
]
},
'xcode_settings': {
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES'
}
}
],
['OS=="win"',
{
'defines': [
'__WINDOWS_MM__'
],
'link_settings': {
'libraries': [
'-lwinmm.lib'
],
}
}
]
]
}
]
}
@vjpr
Copy link

vjpr commented Dec 14, 2020

Doesn't work with node-gyp configure -- -f xcode

              'libraries': [
                '-framework', 'CoreMidi',
                '-framework', 'CoreAudio',
                '-framework', 'CoreFoundation',
              ]
Traceback (most recent call last):
  File "/Users/Vaughan/dev-mono/thirtyfive/node_modules/.pnpm/[email protected]/node_modules/node-gyp/gyp/gyp_main.py", line 51, in <module>
    sys.exit(gyp.script_main())
  File "/Users/Vaughan/dev-mono/thirtyfive/node_modules/.pnpm/[email protected]/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 670, in script_main
    return main(sys.argv[1:])
  File "/Users/Vaughan/dev-mono/thirtyfive/node_modules/.pnpm/[email protected]/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 662, in main
    return gyp_main(args)
  File "/Users/Vaughan/dev-mono/thirtyfive/node_modules/.pnpm/[email protected]/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 647, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "/Users/Vaughan/dev-mono/thirtyfive/node_modules/.pnpm/[email protected]/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py", line 1345, in GenerateOutput
    xct.FrameworksPhase().AddFile(library)
  File "/Users/Vaughan/dev-mono/thirtyfive/node_modules/.pnpm/[email protected]/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py", line 1980, in AddFile
    self.AppendBuildFile(pbxbuildfile, path)
  File "/Users/Vaughan/dev-mono/thirtyfive/node_modules/.pnpm/[email protected]/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py", line 1960, in AppendBuildFile
    self._AddBuildFileToDicts(pbxbuildfile, path)
  File "/Users/Vaughan/dev-mono/thirtyfive/node_modules/.pnpm/[email protected]/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py", line 1949, in _AddBuildFileToDicts
    "Found multiple build files for " + xcfilelikeelement.Name()
ValueError: Found multiple build files for -framework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment