Here is the working file I'm now using:
{
'variables': {
'pkg-config': 'pkg-config'
},
'conditions': [
['OS=="linux"', {
'targets': [
{
'target_name': 'trackbox',
'type': 'executable',
'sources': [
'src/main_linux.cc',
],
'cflags': [
'<!@(<(pkg-config) --cflags gtk+-2.0)',
],
'ldflags': [
'<!@(<(pkg-config) --libs-only-L --libs-only-other gtk+-2.0)',
],
'libraries': [
'<!@(<(pkg-config) --libs-only-l gtk+-2.0)',
],
},
],
}]
],
}