diff options
author | gspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-24 01:46:45 +0000 |
---|---|---|
committer | gspencer@google.com <gspencer@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-24 01:46:45 +0000 |
commit | 746cd5788d57799fee1e327867ab9d4e9a76d6af (patch) | |
tree | dba40e195700f6f841c9c945b8fd2519128328f7 /o3d/plugin/idl | |
parent | 015c1e689f04a11f07401394da0bf13018218fe1 (diff) | |
download | chromium_src-746cd5788d57799fee1e327867ab9d4e9a76d6af.zip chromium_src-746cd5788d57799fee1e327867ab9d4e9a76d6af.tar.gz chromium_src-746cd5788d57799fee1e327867ab9d4e9a76d6af.tar.bz2 |
This adds in the GYP files needed for our GYP build,
and modifies the DEPS file extensively to match.
Review URL: http://codereview.chromium.org/131116
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19091 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin/idl')
-rw-r--r-- | o3d/plugin/idl/codegen.py | 36 | ||||
-rw-r--r-- | o3d/plugin/idl/idl.gyp | 284 |
2 files changed, 320 insertions, 0 deletions
diff --git a/o3d/plugin/idl/codegen.py b/o3d/plugin/idl/codegen.py new file mode 100644 index 0000000..8f029bf --- /dev/null +++ b/o3d/plugin/idl/codegen.py @@ -0,0 +1,36 @@ +#!/usr/bin/python2.4 +# Copyright 2009 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This file is just here so that we can modify the python path before +# invoking nixysa. + +import subprocess +import sys +import os +import os.path + +third_party = os.path.join('..', '..', '..', 'third_party') +pythonpath = os.pathsep.join([os.path.join(third_party, 'gflags', 'python'), + os.path.join(third_party, 'ply', 'files')]) + +orig_pythonpath = os.environ.get('PYTHONPATH') +if orig_pythonpath: + pythonpath = os.pathsep.join([pythonpath, orig_pythonpath]) + +os.environ['PYTHONPATH'] = pythonpath + +nixysa = os.path.join(third_party, 'nixysa', 'files', 'codegen.py') +status = subprocess.call([sys.executable, nixysa] + sys.argv[1:]) +sys.exit(status) diff --git a/o3d/plugin/idl/idl.gyp b/o3d/plugin/idl/idl.gyp new file mode 100644 index 0000000..df5f206 --- /dev/null +++ b/o3d/plugin/idl/idl.gyp @@ -0,0 +1,284 @@ +# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'includes': [ + '../../build/common.gypi', + ], + 'variables': { + 'chromium_code': 1, + 'idl_out_dir': '<(SHARED_INTERMEDIATE_DIR)/idl_glue', + }, + 'targets': [ + { + 'target_name': 'idl_generator', + 'type': 'none', + 'variables': { + 'idl_files' : [ + # NOTE: Sadly, if you add/remove/rename an IDL file in this + # list, you must also update the list of outputs below. + 'archive_request.idl', + 'bounding_box.idl', + 'buffer.idl', + 'canvas.idl', + 'canvas_paint.idl', + 'canvas_shader.idl', + 'clear_buffer.idl', + 'client.idl', + 'counter.idl', + 'cursor.idl', + 'curve.idl', + 'display_mode.idl', + 'draw_context.idl', + 'draw_element.idl', + 'draw_list.idl', + 'draw_pass.idl', + 'effect.idl', + 'element.idl', + 'event.idl', + 'field.idl', + 'file_request.idl', + 'function.idl', + 'material.idl', + 'matrix4_axis_rotation.idl', + 'matrix4_composition.idl', + 'matrix4_scale.idl', + 'matrix4_translation.idl', + 'named.idl', + 'pack.idl', + 'param.idl', + 'param_array.idl', + 'param_object.idl', + 'param_operation.idl', + 'plugin.idl', + 'primitive.idl', + 'raw_data.idl', + 'ray_intersection_info.idl', + 'render_event.idl', + 'render_node.idl', + 'render_surface.idl', + 'render_surface_set.idl', + 'sampler.idl', + 'shape.idl', + 'skin.idl', + 'standard_param.idl', + 'state.idl', + 'state_set.idl', + 'stream.idl', + 'stream_bank.idl', + 'texture.idl', + 'tick_event.idl', + 'transform.idl', + 'tree_traversal.idl', + 'types.idl', + 'vector.idl', + 'vertex_source.idl', + 'viewport.idl', + ], + }, + 'rules': [ + { + 'rule_name': 'generate_idl', + 'extension': 'idl', + 'process_outputs_as_sources': 1, + 'inputs': [ + '../../../<(nixysadir)/codegen.py', + 'codegen.py', + ], + 'outputs': [ + '<(idl_out_dir)/<(RULE_INPUT_ROOT)_glue.cc', + '<(idl_out_dir)/<(RULE_INPUT_ROOT)_glue.h', + '<(idl_out_dir)/globals_glue.cc', + '<(idl_out_dir)/globals_glue.h', + '<(idl_out_dir)/hash', + '<(idl_out_dir)/parsetab.py', + '<(idl_out_dir)/parsetab.pyc', + ], + 'action': [ + 'python', + 'codegen.py', + '--binding-module=o3d:../../plugin/o3d_binding.py', + '--generate=npapi', + '--output-dir=<(idl_out_dir)', + '<@(idl_files)', + ], + 'message': 'Generating IDL glue for <(RULE_INPUT_PATH)', + }, + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '<(idl_out_dir)', + ], + }, + 'sources': [ + '<@(idl_files)', + ], + }, + { + 'target_name': 'o3dPluginIdl', + 'type': 'static_library', + 'variables': { + 'static_glue_dir': '../../../<(nixysadir)/static_glue/npapi', + }, + 'include_dirs': [ + '../..', + '../../..', + '../../../<(npapidir)/include', + '../../plugin/cross', + '<(static_glue_dir)', + ], + 'dependencies': [ + '../../../<(zlibdir)/zlib.gyp:zlib', + '../../../base/base.gyp:base', + '../../../skia/skia.gyp:skia', + 'idl_generator', + ], + 'sources': [ + '../cross/archive_request_static_glue.cc', + '../cross/archive_request_static_glue.h', + '../cross/o3d_glue.cc', + '../cross/o3d_glue.h', + '<(static_glue_dir)/common.cc', + '<(static_glue_dir)/npn_api.cc', + '<(static_glue_dir)/static_object.cc', + '<(idl_out_dir)/globals_glue.cc', + '<(idl_out_dir)/globals_glue.h', + + # Sadly, the files below here are just an expansion of the + # list of IDL files in 'idl_files', above, so if you change on + # above, you also need to change this list. + '<(idl_out_dir)/archive_request_glue.cc', + '<(idl_out_dir)/archive_request_glue.h', + '<(idl_out_dir)/bounding_box_glue.cc', + '<(idl_out_dir)/bounding_box_glue.h', + '<(idl_out_dir)/buffer_glue.cc', + '<(idl_out_dir)/buffer_glue.h', + '<(idl_out_dir)/canvas_glue.cc', + '<(idl_out_dir)/canvas_glue.h', + '<(idl_out_dir)/canvas_paint_glue.cc', + '<(idl_out_dir)/canvas_paint_glue.h', + '<(idl_out_dir)/canvas_shader_glue.cc', + '<(idl_out_dir)/canvas_shader_glue.h', + '<(idl_out_dir)/clear_buffer_glue.cc', + '<(idl_out_dir)/clear_buffer_glue.h', + '<(idl_out_dir)/client_glue.cc', + '<(idl_out_dir)/client_glue.h', + '<(idl_out_dir)/counter_glue.cc', + '<(idl_out_dir)/counter_glue.h', + '<(idl_out_dir)/cursor_glue.cc', + '<(idl_out_dir)/cursor_glue.h', + '<(idl_out_dir)/curve_glue.cc', + '<(idl_out_dir)/curve_glue.h', + '<(idl_out_dir)/display_mode_glue.cc', + '<(idl_out_dir)/display_mode_glue.h', + '<(idl_out_dir)/draw_context_glue.cc', + '<(idl_out_dir)/draw_context_glue.h', + '<(idl_out_dir)/draw_element_glue.cc', + '<(idl_out_dir)/draw_element_glue.h', + '<(idl_out_dir)/draw_list_glue.cc', + '<(idl_out_dir)/draw_list_glue.h', + '<(idl_out_dir)/draw_pass_glue.cc', + '<(idl_out_dir)/draw_pass_glue.h', + '<(idl_out_dir)/effect_glue.cc', + '<(idl_out_dir)/effect_glue.h', + '<(idl_out_dir)/element_glue.cc', + '<(idl_out_dir)/element_glue.h', + '<(idl_out_dir)/event_glue.cc', + '<(idl_out_dir)/event_glue.h', + '<(idl_out_dir)/field_glue.cc', + '<(idl_out_dir)/field_glue.h', + '<(idl_out_dir)/file_request_glue.cc', + '<(idl_out_dir)/file_request_glue.h', + '<(idl_out_dir)/function_glue.cc', + '<(idl_out_dir)/function_glue.h', + '<(idl_out_dir)/material_glue.cc', + '<(idl_out_dir)/material_glue.h', + '<(idl_out_dir)/matrix4_axis_rotation_glue.cc', + '<(idl_out_dir)/matrix4_axis_rotation_glue.h', + '<(idl_out_dir)/matrix4_composition_glue.cc', + '<(idl_out_dir)/matrix4_composition_glue.h', + '<(idl_out_dir)/matrix4_scale_glue.cc', + '<(idl_out_dir)/matrix4_scale_glue.h', + '<(idl_out_dir)/matrix4_translation_glue.cc', + '<(idl_out_dir)/matrix4_translation_glue.h', + '<(idl_out_dir)/named_glue.cc', + '<(idl_out_dir)/named_glue.h', + '<(idl_out_dir)/pack_glue.cc', + '<(idl_out_dir)/pack_glue.h', + '<(idl_out_dir)/param_array_glue.cc', + '<(idl_out_dir)/param_array_glue.h', + '<(idl_out_dir)/param_glue.cc', + '<(idl_out_dir)/param_glue.h', + '<(idl_out_dir)/param_object_glue.cc', + '<(idl_out_dir)/param_object_glue.h', + '<(idl_out_dir)/param_operation_glue.cc', + '<(idl_out_dir)/param_operation_glue.h', + '<(idl_out_dir)/plugin_glue.cc', + '<(idl_out_dir)/plugin_glue.h', + '<(idl_out_dir)/primitive_glue.cc', + '<(idl_out_dir)/primitive_glue.h', + '<(idl_out_dir)/raw_data_glue.cc', + '<(idl_out_dir)/raw_data_glue.h', + '<(idl_out_dir)/ray_intersection_info_glue.cc', + '<(idl_out_dir)/ray_intersection_info_glue.h', + '<(idl_out_dir)/render_event_glue.cc', + '<(idl_out_dir)/render_event_glue.h', + '<(idl_out_dir)/render_node_glue.cc', + '<(idl_out_dir)/render_node_glue.h', + '<(idl_out_dir)/render_surface_glue.cc', + '<(idl_out_dir)/render_surface_glue.h', + '<(idl_out_dir)/render_surface_set_glue.cc', + '<(idl_out_dir)/render_surface_set_glue.h', + '<(idl_out_dir)/sampler_glue.cc', + '<(idl_out_dir)/sampler_glue.h', + '<(idl_out_dir)/shape_glue.cc', + '<(idl_out_dir)/shape_glue.h', + '<(idl_out_dir)/skin_glue.cc', + '<(idl_out_dir)/skin_glue.h', + '<(idl_out_dir)/standard_param_glue.cc', + '<(idl_out_dir)/standard_param_glue.h', + '<(idl_out_dir)/state_glue.cc', + '<(idl_out_dir)/state_glue.h', + '<(idl_out_dir)/state_set_glue.cc', + '<(idl_out_dir)/state_set_glue.h', + '<(idl_out_dir)/stream_bank_glue.cc', + '<(idl_out_dir)/stream_bank_glue.h', + '<(idl_out_dir)/stream_glue.cc', + '<(idl_out_dir)/stream_glue.h', + '<(idl_out_dir)/texture_glue.cc', + '<(idl_out_dir)/texture_glue.h', + '<(idl_out_dir)/tick_event_glue.cc', + '<(idl_out_dir)/tick_event_glue.h', + '<(idl_out_dir)/transform_glue.cc', + '<(idl_out_dir)/transform_glue.h', + '<(idl_out_dir)/tree_traversal_glue.cc', + '<(idl_out_dir)/tree_traversal_glue.h', + '<(idl_out_dir)/types_glue.cc', + '<(idl_out_dir)/types_glue.h', + '<(idl_out_dir)/vector_glue.cc', + '<(idl_out_dir)/vector_glue.h', + '<(idl_out_dir)/vertex_source_glue.cc', + '<(idl_out_dir)/vertex_source_glue.h', + '<(idl_out_dir)/viewport_glue.cc', + '<(idl_out_dir)/viewport_glue.h', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '../../../<(npapidir)/include', + '<(idl_out_dir)', + '<(static_glue_dir)', + ], + }, + 'conditions': [ + ['OS=="win"', + { + 'defines': [ + 'OS_WINDOWS', + ], + }, + ], + ], + }, + ], +} |