--- a/binding.gyp
+++ b/binding.gyp
@@ -13,8 +13,26 @@
'src/xml_syntax_error.cc',
'src/xml_xpath_context.cc',
],
- 'dependencies': [
- './vendor/libxml/libxml.gyp:libxml'
+ 'conditions': [
+ ['OS=="win"', {
+ # no Windows support yet...
+ }, {
+ 'libraries': [
+ '<!@(xml2-config --libs)'
+ ],
+ }],
+ ['OS=="mac"', {
+ # cflags on OS X are stupid and have to be defined like this
+ 'xcode_settings': {
+ 'OTHER_CFLAGS': [
+ '<!@(xml2-config --cflags)'
+ ]
+ }
+ }, {
+ 'cflags': [
+ '<!@(xml2-config --cflags)'
+ ],
+ }]
]
}
]