michael@0: # Copyright (c) 2012 The Chromium Authors. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: michael@0: { michael@0: 'variables': { michael@0: # When including this gypi, the following variables must be set: michael@0: # idl_schema_files: an array of idl files that comprise the api model. michael@0: # cc_dir: path to generated files michael@0: # root_namespace: the C++ namespace that all generated files go under michael@0: # Functions and namespaces can be excluded by setting "nocompile" to true. michael@0: 'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler', michael@0: 'api_gen': '<(api_gen_dir)/compiler.py', michael@0: }, michael@0: 'actions': [ michael@0: { michael@0: 'action_name': 'genapi_bundle', michael@0: 'inputs': [ michael@0: '<(api_gen_dir)/cc_generator.py', michael@0: '<(api_gen_dir)/code.py', michael@0: '<(api_gen_dir)/compiler.py', michael@0: '<(api_gen_dir)/cpp_type_generator.py', michael@0: '<(api_gen_dir)/cpp_util.py', michael@0: '<(api_gen_dir)/h_generator.py', michael@0: '<(api_gen_dir)/idl_schema.py', michael@0: '<(api_gen_dir)/json_schema.py', michael@0: '<(api_gen_dir)/model.py', michael@0: '<(api_gen_dir)/schema_bundle_generator.py', michael@0: '<(api_gen_dir)/util_cc_helper.py', michael@0: '<@(idl_schema_files)', michael@0: ], michael@0: 'outputs': [ michael@0: '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/generated_api.h', michael@0: '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/generated_schemas.h', michael@0: '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/generated_schemas.cc', michael@0: ], michael@0: 'action': [ michael@0: 'python', michael@0: '<(api_gen)', michael@0: '--root=<(DEPTH)', michael@0: '--destdir=<(SHARED_INTERMEDIATE_DIR)', michael@0: '--namespace=<(root_namespace)', michael@0: '--bundle', michael@0: '<@(idl_schema_files)', michael@0: ], michael@0: 'message': 'Generating C++ API bundle code', michael@0: 'process_outputs_as_sources': 1, michael@0: } michael@0: ], michael@0: 'include_dirs': [ michael@0: '<(SHARED_INTERMEDIATE_DIR)', michael@0: '<(DEPTH)', michael@0: ], michael@0: 'direct_dependent_settings': { michael@0: 'include_dirs': [ michael@0: '<(SHARED_INTERMEDIATE_DIR)', michael@0: ] michael@0: }, michael@0: # This target exports a hard dependency because it generates header michael@0: # files. michael@0: 'hard_dependency': 1, michael@0: }