summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/idl/idl.gyp
blob: 81ead55e2abb5bc70335287ee6dbcfb2139bf826 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# 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': 0,
    'idl_out_path': '<(SHARED_INTERMEDIATE_DIR)/idl_glue',
    'static_glue_dir': '../../../<(nixysadir)/static_glue/npapi',
    'idl_files': [
      '<!@(python get_idl_files.py)',
      'layer.idl',
      'pattern.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',
          ],
        },
      ],
    ],
  },
  'targets': [
    {
      # This target is only used when we're not built as part of Chrome,
      # since chrome has its own implementation of the NPAPI from webkit.
      'target_name': 'o3dNpnApi',
      'type': 'static_library',
      'include_dirs': [
        '../../../<(npapidir)/include',
      ],
      'sources': [
        '<(static_glue_dir)/npn_api.cc',
      ],
    },
    {
      'target_name': 'o3dPluginIdl',
      'type': 'static_library',
      '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': [
        {
          'action_name': 'generate_idl',
          'process_outputs_as_sources': 1,
          'inputs': [
            '<@(idl_files)',
          ],
          'outputs': [
            '<(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',
            '--binding-module=o3d:../../plugin/o3d_binding.py',
            '--generate=npapi',
            '--output-dir=<(idl_out_path)',
            '<@(idl_files)',
          ],
          'message': 'Generating IDL glue code.',
        },
      ],
      '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)/static_object.cc',
      ],
    },
  ],
}

# Local Variables:
# tab-width:2
# indent-tabs-mode:nil
# End:
# vim: set expandtab tabstop=2 shiftwidth=2: