media/webrtc/trunk/build/json_schema_compile.gypi

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
michael@0 2 # Use of this source code is governed by a BSD-style license that can be
michael@0 3 # found in the LICENSE file.
michael@0 4
michael@0 5 {
michael@0 6 'variables': {
michael@0 7 # When including this gypi, the following variables must be set:
michael@0 8 # json_schema_files: a list of json files that comprise the api model.
michael@0 9 # idl_schema_files: a list of IDL files that comprise the api model.
michael@0 10 # cc_dir: path to generated files
michael@0 11 # root_namespace: the C++ namespace that all generated files go under
michael@0 12 # Functions and namespaces can be excluded by setting "nocompile" to true.
michael@0 13 'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler',
michael@0 14 'api_gen': '<(api_gen_dir)/compiler.py',
michael@0 15 },
michael@0 16 'rules': [
michael@0 17 {
michael@0 18 'rule_name': 'genapi',
michael@0 19 'extension': 'json',
michael@0 20 'inputs': [
michael@0 21 '<(api_gen_dir)/any.cc',
michael@0 22 '<(api_gen_dir)/any.h',
michael@0 23 '<(api_gen_dir)/any_helper.py',
michael@0 24 '<(api_gen_dir)/cc_generator.py',
michael@0 25 '<(api_gen_dir)/code.py',
michael@0 26 '<(api_gen_dir)/compiler.py',
michael@0 27 '<(api_gen_dir)/cpp_type_generator.py',
michael@0 28 '<(api_gen_dir)/cpp_util.py',
michael@0 29 '<(api_gen_dir)/h_generator.py',
michael@0 30 '<(api_gen_dir)/json_schema.py',
michael@0 31 '<(api_gen_dir)/model.py',
michael@0 32 '<(api_gen_dir)/util.cc',
michael@0 33 '<(api_gen_dir)/util.h',
michael@0 34 '<(api_gen_dir)/util_cc_helper.py',
michael@0 35 # TODO(calamity): uncomment this when gyp on windows behaves like other
michael@0 36 # platforms. List expansions of filepaths in inputs expand to different
michael@0 37 # things.
michael@0 38 # '<@(json_schema_files)',
michael@0 39 ],
michael@0 40 'outputs': [
michael@0 41 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc',
michael@0 42 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).h',
michael@0 43 ],
michael@0 44 'action': [
michael@0 45 'python',
michael@0 46 '<(api_gen)',
michael@0 47 '<(RULE_INPUT_PATH)',
michael@0 48 '--root=<(DEPTH)',
michael@0 49 '--destdir=<(SHARED_INTERMEDIATE_DIR)',
michael@0 50 '--namespace=<(root_namespace)',
michael@0 51 ],
michael@0 52 'message': 'Generating C++ code from <(RULE_INPUT_PATH) json files',
michael@0 53 'process_outputs_as_sources': 1,
michael@0 54 },
michael@0 55 {
michael@0 56 'rule_name': 'genapi_idl',
michael@0 57 'msvs_external_rule': 1,
michael@0 58 'extension': 'idl',
michael@0 59 'inputs': [
michael@0 60 '<(api_gen_dir)/any.cc',
michael@0 61 '<(api_gen_dir)/any.h',
michael@0 62 '<(api_gen_dir)/any_helper.py',
michael@0 63 '<(api_gen_dir)/cc_generator.py',
michael@0 64 '<(api_gen_dir)/code.py',
michael@0 65 '<(api_gen_dir)/compiler.py',
michael@0 66 '<(api_gen_dir)/cpp_type_generator.py',
michael@0 67 '<(api_gen_dir)/cpp_util.py',
michael@0 68 '<(api_gen_dir)/h_generator.py',
michael@0 69 '<(api_gen_dir)/idl_schema.py',
michael@0 70 '<(api_gen_dir)/model.py',
michael@0 71 '<(api_gen_dir)/util.cc',
michael@0 72 '<(api_gen_dir)/util.h',
michael@0 73 '<(api_gen_dir)/util_cc_helper.py',
michael@0 74 # TODO(calamity): uncomment this when gyp on windows behaves like other
michael@0 75 # platforms. List expansions of filepaths in inputs expand to different
michael@0 76 # things.
michael@0 77 # '<@(idl_schema_files)',
michael@0 78 ],
michael@0 79 'outputs': [
michael@0 80 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc',
michael@0 81 '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).h',
michael@0 82 ],
michael@0 83 'action': [
michael@0 84 'python',
michael@0 85 '<(api_gen)',
michael@0 86 '<(RULE_INPUT_PATH)',
michael@0 87 '--root=<(DEPTH)',
michael@0 88 '--destdir=<(SHARED_INTERMEDIATE_DIR)',
michael@0 89 '--namespace=<(root_namespace)',
michael@0 90 ],
michael@0 91 'message': 'Generating C++ code from <(RULE_INPUT_PATH) IDL files',
michael@0 92 'process_outputs_as_sources': 1,
michael@0 93 },
michael@0 94 ],
michael@0 95 'include_dirs': [
michael@0 96 '<(SHARED_INTERMEDIATE_DIR)',
michael@0 97 '<(DEPTH)',
michael@0 98 ],
michael@0 99 'dependencies':[
michael@0 100 '<(DEPTH)/tools/json_schema_compiler/api_gen_util.gyp:api_gen_util',
michael@0 101 ],
michael@0 102 'direct_dependent_settings': {
michael@0 103 'include_dirs': [
michael@0 104 '<(SHARED_INTERMEDIATE_DIR)',
michael@0 105 ]
michael@0 106 },
michael@0 107 # This target exports a hard dependency because it generates header
michael@0 108 # files.
michael@0 109 'hard_dependency': 1,
michael@0 110 }

mercurial