Fix build break
[chromium-blink-merge.git] / ui / surface / surface.gyp
blobd64972da39265d4e59604a31de23c82e57b54339
1 # Copyright (c) 2012 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.
6   'variables': {
7     'chromium_code': 1,
8   },
10   'target_defaults': {
11     'conditions': [
12       ['use_x11 == 1', {
13         'include_dirs': [
14           '<(DEPTH)/third_party/angle/include',
15         ],
16       }],
17       # TODO(ncarter): Does hlsl compilation belong in a shared location?
18       ['OS == "win"', {
19         'include_dirs': [
20           '<(INTERMEDIATE_DIR)/hlsl',
21         ],
22         'rules': [
23           {
24             'variables': {
25               'fxc': '<(windows_sdk_path)/bin/x86/fxc.exe',
26               'h_file': '<(INTERMEDIATE_DIR)/hlsl/<(RULE_INPUT_ROOT)_hlsl_compiled.h',
27               'cc_file': '<(INTERMEDIATE_DIR)/hlsl/<(RULE_INPUT_ROOT)_hlsl_compiled.cc',
28             },
29             'rule_name': 'compile_hlsl',
30             'extension': 'hlsl',
31             'inputs': [
32               '<(fxc)',
33               'compile_hlsl.py'
34             ],
35             'outputs': [
36               '<(h_file)',
37               '<(cc_file)',
38             ],
39             'action': [
40               'python',
41               'compile_hlsl.py',
42               '--shader_compiler_tool', '<(fxc)',
43               '--output_h_file', '<(h_file)',
44               '--output_cc_file', '<(cc_file)',
45               '--input_hlsl_file', '<(RULE_INPUT_PATH)',
46             ],
47             'msvs_cygwin_shell': 0,
48             'message': 'Generating shaders from <(RULE_INPUT_PATH)',
49             'process_outputs_as_sources': 1,
50           },
51         ],
52       }],
53     ],
54   },
55   'targets': [
56     {
57       'target_name': 'surface',
58       'type': '<(component)',
59       'dependencies': [
60         '<(DEPTH)/base/base.gyp:base',
61         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
62         '<(DEPTH)/media/media.gyp:media',
63         '<(DEPTH)/skia/skia.gyp:skia',
64         '<(DEPTH)/ui/gl/gl.gyp:gl',
65         '<(DEPTH)/ui/ui.gyp:ui',
66       ],
67       'sources': [
68         'accelerated_surface_mac.cc',
69         'accelerated_surface_mac.h',
70         'accelerated_surface_transformer_win.cc',
71         'accelerated_surface_transformer_win.h',
72         'accelerated_surface_transformer_win.hlsl',
73         'accelerated_surface_win.cc',
74         'accelerated_surface_win.h',
75         'd3d9_utils_win.cc',
76         'd3d9_utils_win.h',
77         'io_surface_support_mac.cc',
78         'io_surface_support_mac.h',
79         'surface_export.h',
80         'surface_switches.h',
81         'surface_switches.cc',
82         'transport_dib.h',
83         'transport_dib.cc',
84         'transport_dib_posix.cc',
85         'transport_dib_sysvipc.cc',
86         'transport_dib_win.cc',
87       ],
88       'defines': [
89         'SURFACE_IMPLEMENTATION',
90       ],
91     },
92   ],
93   'conditions': [
94     ['OS == "win"', {
95       'targets': [
96         {
97           'target_name': 'surface_gpu_tests',
98           'type': '<(gtest_target_type)',
99           'dependencies': [
100             '<(DEPTH)/base/base.gyp:base',
101             '<(DEPTH)/base/base.gyp:run_all_unittests',
102             '<(DEPTH)/media/media.gyp:yuv_convert',
103             '<(DEPTH)/skia/skia.gyp:skia',
104             '<(DEPTH)/testing/gtest.gyp:gtest',
105             '<(DEPTH)/ui/ui.gyp:ui',
106             'surface',
107           ],
108           'sources': [
109             'accelerated_surface_transformer_win_unittest.cc',
110           ],
111         },
112       ],
113     }],
114   ],