Browse Source

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

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

20
binding.gyp

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

Loading…
Cancel
Save