todo use generate_shim_headers script --- chromium-browser-24.0.1312.45/src/third_party/libXNVCtrl/libXNVCtrl.gyp 2013-01-04 00:45:35.620067292 +0200 +++ chromium-browser-25.0.1364.29/src/third_party/libXNVCtrl/libXNVCtrl.gyp 2013-01-12 16:17:25.440747088 +0200 @@ -5,14 +5,55 @@ { - 'targets': [ - { - 'target_name': 'libXNVCtrl', - 'type': 'static_library', - 'sources': [ - 'NVCtrl.c', - 'NVCtrl.h', - 'NVCtrlLib.h', - 'nv_control.h', + 'variables': { + 'use_system_libxnvctrl%': 0, + }, + 'conditions': [ + ['use_system_libxnvctrl==0', { + 'targets': [ + { + 'target_name': 'libXNVCtrl', + 'type': 'static_library', + 'sources': [ + 'NVCtrl.c', + 'NVCtrl.h', + 'NVCtrlLib.h', + 'nv_control.h', + ], + }, ], - }, - ], + }, { # use_system_libxnvctrl==1 + 'conditions': [ + ['sysroot!=""', { + 'variables': { + 'pkg-config': '../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"', + }, + }, { + 'variables': { + 'pkg-config': 'pkg-config' + }, + }], + ], + 'targets': [ + { + 'target_name': 'libXNVCtrl', + 'type': 'none', + 'direct_dependent_settings': { + 'cflags': [ + ' +#include +#else +#include "third_party/libXNVCtrl/NVCtrl.h" +#include "third_party/libXNVCtrl/NVCtrlLib.h" +#endif +#endif