Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / ozone / ozone.gyp
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 {
6   'variables': {
7     'chromium_code': 1,
8     'external_ozone_platforms': [],
9     'external_ozone_platform_files': [],
10     'external_ozone_platform_deps': [],
11     'internal_ozone_platforms': [],
12     'internal_ozone_platform_deps': [],
13   },
14   'targets': [
15     {
16       'target_name': 'ozone',
17       'type': '<(component)',
18       'dependencies': [
19         '<(DEPTH)/base/base.gyp:base',
20         '<(DEPTH)/ui/events/events.gyp:events',
21         '<(DEPTH)/ui/gfx/gfx.gyp:gfx',
22         '<(DEPTH)/ui/gfx/gfx.gyp:gfx_geometry',
23         '<(DEPTH)/skia/skia.gyp:skia',
24         '<@(external_ozone_platform_deps)',
25         '<@(internal_ozone_platform_deps)',
26       ],
27       'defines': [
28         'OZONE_IMPLEMENTATION',
29       ],
30       'variables': {
31         'platform_list_file': '<(SHARED_INTERMEDIATE_DIR)/ui/ozone/ozone_platform_list.cc',
32         'ozone_platforms': [
33           '<@(external_ozone_platforms)',
34           '<@(internal_ozone_platforms)',
35         ],
36       },
37       'sources': [
38         '<(platform_list_file)',
39         # common/chromeos files are excluded automatically when building with
40         # chromeos=0, by exclusion rules in filename_rules.gypi due to the
41         # 'chromeos' folder name.
42         'common/chromeos/native_display_delegate_ozone.cc',
43         'common/chromeos/native_display_delegate_ozone.h',
44         'ozone_platform.cc',
45         'ozone_platform.h',
46         'ozone_switches.cc',
47         'ozone_switches.h',
48         '<@(external_ozone_platform_files)',
49       ],
50       'includes': [
51         'ime/ime.gypi',
52       ],
53       'actions': [
54         {
55           'action_name': 'generate_ozone_platform_list',
56           'variables': {
57             'generator_path': 'generate_ozone_platform_list.py',
58           },
59           'inputs': [
60             '<(generator_path)',
61           ],
62           'outputs': [
63             '<(platform_list_file)',
64           ],
65           'action': [
66             'python',
67             '<(generator_path)',
68             '--output_file=<(platform_list_file)',
69             '--default=<(ozone_platform)',
70             '<@(ozone_platforms)',
71           ],
72         },
73       ],
74       'conditions': [
75         ['use_udev == 0', {
76           'sources/': [
77             ['exclude', '_udev\\.(h|cc)$'],
78           ],
79         }],
80         ['chromeos==1', {
81           'dependencies': [
82             '<(DEPTH)/ui/display/display.gyp:display_types',
83           ],
84         }],
85       ]
86     },
87   ],
88   'conditions': [
89     ['<(ozone_platform_caca) == 1', {
90       'includes': [
91         'platform/caca/caca.gypi',
92       ],
93     }],
94     ['<(ozone_platform_dri) == 1', {
95       'includes': [
96         'platform/dri/dri.gypi',
97       ],
98     }],
99     ['<(ozone_platform_test) == 1', {
100       'includes': [
101         'platform/test/test.gypi',
102       ],
103     }],
104   ],
105 }