diff options
Diffstat (limited to 'o3d/plugin/idl/idl.gyp')
-rw-r--r-- | o3d/plugin/idl/idl.gyp | 118 |
1 files changed, 67 insertions, 51 deletions
diff --git a/o3d/plugin/idl/idl.gyp b/o3d/plugin/idl/idl.gyp index 4194115..b381e85 100644 --- a/o3d/plugin/idl/idl.gyp +++ b/o3d/plugin/idl/idl.gyp @@ -8,7 +8,7 @@ ], 'variables': { 'chromium_code': 0, - 'idl_out_dir': '<(SHARED_INTERMEDIATE_DIR)/idl_glue', + 'idl_out_path': '<(SHARED_INTERMEDIATE_DIR)/idl_glue', 'static_glue_dir': '../../../third_party/nixysa/static_glue/npapi', 'idl_files': [ 'archive_request.idl', @@ -71,85 +71,101 @@ 'viewport.idl', ], }, + 'target_defaults': { + 'include_dirs': [ + '../..', + '../../..', + '../../../<(npapidir)/include', + '../../../<(zlibdir)', + '../../../skia/config', + '../../plugin/cross', + '<(static_glue_dir)', + '<(idl_out_path)', + ], + 'conditions': [ + ['OS=="win"', + { + 'defines': [ + 'OS_WINDOWS', + ], + }, + ], + ['OS=="mac"', + { + 'include_dirs': [ + '../mac', + ], + 'defines': [ + 'XP_MACOSX', + ], + }, + ], + ['OS=="linux"', + { + 'include_dirs': [ + '/usr/include/cairo', + '/usr/include/glib-2.0', + '/usr/include/gtk-2.0', + '/usr/include/pango-1.0', + '/usr/lib/glib-2.0/include', + '/usr/lib/gtk-2.0/include', + '/usr/include/atk-1.0', + ], + }, + ], + ], + }, 'targets': [ { 'target_name': 'o3dPluginIdl', 'type': 'static_library', - 'rules': [ + 'dependencies': [ + '../../../<(zlibdir)/zlib.gyp:zlib', + '../../../base/base.gyp:base', + '../../../skia/skia.gyp:skia', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '../../../<(npapidir)/include', + '<(idl_out_path)', + '<(static_glue_dir)', + ], + }, + 'actions': [ { - 'rule_name': 'generate_idl', - 'extension': 'idl', + 'action_name': 'generate_idl', 'process_outputs_as_sources': 1, 'inputs': [ '../../../<(nixysadir)/codegen.py', 'codegen.py', + '<@(idl_files)', ], 'outputs': [ - '<(idl_out_dir)/<(RULE_INPUT_ROOT)_glue.cc', - '<(idl_out_dir)/<(RULE_INPUT_ROOT)_glue.h', + '<(idl_out_path)/hash', + '<(idl_out_path)/globals_glue.cc', + '<(idl_out_path)/globals_glue.h', + '<!@(python idl_filenames.py \'<(idl_out_path)\' <@(idl_files))', ], 'action': [ 'python', 'codegen.py', + '--force', # If the build system wants to rebuild, we rebuild. '--binding-module=o3d:../../plugin/o3d_binding.py', '--generate=npapi', - '--output-dir=<(idl_out_dir)', + '--output-dir=<(idl_out_path)', '<@(idl_files)', ], - 'message': 'Generating IDL glue for <(RULE_INPUT_PATH)', + 'message': 'Generating IDL glue code.', }, ], - 'include_dirs': [ - '../..', - '../../..', - '../../../<(npapidir)/include', - '../../plugin/cross', - '<(static_glue_dir)', - '<(idl_out_dir)', - ], - 'dependencies': [ - '../../../<(zlibdir)/zlib.gyp:zlib', - '../../../base/base.gyp:base', - '../../../skia/skia.gyp:skia', - ], 'sources': [ '../cross/archive_request_static_glue.cc', '../cross/archive_request_static_glue.h', '../cross/o3d_glue.cc', '../cross/o3d_glue.h', - '<(idl_out_dir)/globals_glue.cc', - '<(idl_out_dir)/globals_glue.h', '<(static_glue_dir)/common.cc', '<(static_glue_dir)/npn_api.cc', '<(static_glue_dir)/static_object.cc', - '<@(idl_files)', - ], - 'hard_dependency': 1, - 'direct_dependent_settings': { - 'include_dirs': [ - '../../../<(npapidir)/include', - '<(idl_out_dir)', - '<(static_glue_dir)', - ], - }, - 'conditions': [ - ['OS=="win"', - { - 'defines': [ - 'OS_WINDOWS', - ], - }, - ], - ['OS=="mac"', - { - 'include_dirs': [ - '../mac', - ], - 'defines': [ - 'XP_MACOSX', - ], - }, - ], ], }, ], |