Browse Source

Make binding.gyp friendlier to windows. [#195]

v1.x
c-spencer 13 years ago
parent
commit
309a1eb7e0
  1. 40
      binding.gyp

40
binding.gyp

@ -1,10 +1,20 @@
{ {
'variables': { 'conditions': [
'GTK_Root%': 'C:/GTK', # Set the location of GTK all-in-one bundle ['OS=="win"', {
'with_jpeg%': '<!(./has_lib.sh jpeg)', 'variables': {
'with_gif%': '<!(./has_lib.sh gif)', 'GTK_Root%': 'C:/GTK', # Set the location of GTK all-in-one bundle
'with_pango%': '<!(./has_lib.sh pangocairo)' 'with_jpeg%': 'false',
}, 'with_gif%': 'false',
'with_pango%': 'false'
}
}, { # 'OS!="win"'
'variables': {
'with_jpeg%': '<!(./has_lib.sh jpeg)',
'with_gif%': '<!(./has_lib.sh gif)',
'with_pango%': '<!(./has_lib.sh pangocairo)'
}
}]
],
'targets': [ 'targets': [
{ {
'target_name': 'canvas', 'target_name': 'canvas',
@ -41,11 +51,19 @@
'defines': [ 'defines': [
'HAVE_PANGO' 'HAVE_PANGO'
], ],
'include_dirs': [ # tried to pass through cflags but failed 'conditions': [
'<!@(pkg-config pangocairo --cflags-only-I | sed s/-I//g)' ['OS=="win"', {
], 'libraries': [
'libraries': [ '-l<(GTK_Root)/lib/pangocairo.lib'
'<!@(pkg-config pangocairo --libs)' ]
}, { # 'OS!="win"'
'include_dirs': [ # tried to pass through cflags but failed
'<!@(pkg-config pangocairo --cflags-only-I | sed s/-I//g)'
],
'libraries': [
'<!@(pkg-config pangocairo --libs)'
]
}]
] ]
}], }],
['with_jpeg=="true"', { ['with_jpeg=="true"', {

Loading…
Cancel
Save