Simplify gyp to support non-standard brew installs #56

This commit is contained in:
Lovell Fuller 2014-06-04 22:54:44 +01:00
parent eca2787213
commit 6d20a1ca81

View File

@ -2,16 +2,14 @@
'targets': [{ 'targets': [{
'target_name': 'sharp', 'target_name': 'sharp',
'sources': ['src/sharp.cc'], 'sources': ['src/sharp.cc'],
'variables': {
'PKG_CONFIG_PATH': '<!(which brew >/dev/null 2>&1 && eval $(brew --env) && echo $PKG_CONFIG_LIBDIR || true):/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'
},
'libraries': [ 'libraries': [
'<!@(PKG_CONFIG_PATH="/usr/local/Library/ENV/pkgconfig/10.8:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" pkg-config --libs vips)' '<!(PKG_CONFIG_PATH="<(PKG_CONFIG_PATH)" pkg-config --libs vips)'
], ],
'include_dirs': [ 'include_dirs': [
'/usr/local/include/glib-2.0', '<!(PKG_CONFIG_PATH="<(PKG_CONFIG_PATH)" pkg-config --cflags vips glib-2.0)',
'/usr/local/lib/glib-2.0/include',
'/usr/include/glib-2.0',
'/usr/lib/glib-2.0/include',
'/usr/lib/x86_64-linux-gnu/glib-2.0/include',
'/usr/lib/i386-linux-gnu/glib-2.0/include',
'<!(node -e "require(\'nan\')")' '<!(node -e "require(\'nan\')")'
], ],
'cflags': ['-fexceptions', '-pedantic', '-Wall', '-O3'], 'cflags': ['-fexceptions', '-pedantic', '-Wall', '-O3'],