GYP doesn't have a great story about integrating with other meta-build systems, largely because it's intended to be a meta-build system itself.
For QT, you could do such an approach for Linux. For Mac/Win builds, you could do something like
{
'target_name': 'qt',
'type': 'none',
'variables': {
'qt_dir': 'some_path_to_qt_libraries',
'conditions': [
['OS=="win" and _configuration == "Debug", {
'qt_lib_suffix': 'd4',
}, {
'qt_lib_suffix': '4',
}],
],
},
'conditions': [
['OS=="win" or OS=="mac"', {
'link_settings': {
'libraries': [
'qtmain<(qt_lib_suffix)', 'qtcore4<(qt_lib_suffix)', 'qtgui4<(qt_lib_suffix)'
],
'library_dirs': [
'<(qt_dir)',
],
}],
['OS=="linux"', {
['_toolset=="target"', {
'direct_dependent_settings': {
'cflags': [ '<!@(pkg-config --cflags qt4)', ],
},
'link_settings': {
'ldflags': [
'<(@(pkg-config --libs-only-L --libs-only-other qt4)',
],
'libraries': [
'<@(pkg-config --libs-only-l qt)',
],
},
}],
['OS=="mac"', {
'target_conditions': [
['_configuration=="Debug", {
'mac_framework_dirs': [
'<(qt_dir)/Debug',
],
}, {
'mac_framework_dirs': [
'<(qt_dir)/Release',
],
}],
],
}],
}
}
This is all going from memory - it's been half a year since I last touched QT stuff. I seem to recall the DLL names on Windows being either qtmain4.dll / qtmaind4.dll (hence qt_lib_suffix), whereas on Mac, it was qtmain.dylib but differentiated by the Framework directory (hence the 'mac_framework_dirs' condition). Linux it was typically always built release, but your distro would ship debug symbols (hence the pkg-config calls).
This probably will not work as written, and I'm not looking to necessarily support it, since like I said, I haven't touched QT in a while, but I think that'll cover the major touchpoints for linking, in addition to the comments about 'rules' and 'actions' for uic/moc.
http://code.google.com/p/gyp/wiki/InputFormatReference is the go-to reference for what you can do, and should probably be the first point for any questions. Also, you may find it helpful to read Chromium's GYP files (such as the one I mentioned), since I think you'll find quite a bit cross-platform flexibility in them that isn't always well-expressed in other meta-build tools.
Cheers