OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'conditions': [ | 6 'targets': [ |
7 ['use_system_mesa==0', { | 7 { |
8 'targets': [ | 8 'target_name': 'khronos_headers', |
9 { | 9 'type': 'none', |
10 'target_name': 'khronos_headers', | 10 'all_dependent_settings': { |
11 'type': 'none', | 11 'include_dirs': [ |
12 'all_dependent_settings': { | 12 '.', |
13 'include_dirs': [ | 13 '../../gpu', # Contains GLES2/gl2chromium.h |
14 '.', | 14 ], |
15 '../../gpu', # Contains GLES2/gl2chromium.h | 15 }, |
16 ], | 16 }, |
17 }, | |
18 }, | |
19 ], | |
20 }, { # use_system_mesa==1 | |
21 'targets': [ | |
22 { | |
23 'target_name': 'khronos_headers', | |
24 'type': 'none', | |
25 'variables': { | |
26 'headers_root_path': '../..', | |
27 'header_filenames': [ | |
28 'GLES2/gl2.h;<GLES2/gl2chromium.h>;', | |
29 'GLES2/gl2ext.h;<GLES2/gl2chromium.h>;<GLES2/gl2extchromium.h>', | |
30 ], | |
31 'shim_generator_additional_args': [ | |
32 '--headers-root', '.', | |
33 '--use-include-next', | |
34 ], | |
35 'khronos_headers_symlink_source%': '/usr/include', | |
36 'khronos_headers_symlink_target': '<(SHARED_INTERMEDIATE_DIR)/khrono
s_symlinks', | |
37 }, | |
38 'includes': [ | |
39 '../../build/shim_headers.gypi', | |
40 ], | |
41 'all_dependent_settings': { | |
42 'include_dirs': [ | |
43 '<(khronos_headers_symlink_target)', | |
44 '../../gpu', # Contains GLES2/gl2chromium.h | |
45 ], | |
46 }, | |
47 'actions': [ | |
48 # Symlink system headers into include paths so that nacl | |
49 # untrusted build can use them. Adding system include paths | |
50 # to nacl untrusted build include path would break the build, | |
51 # so we only add needed parts. | |
52 { | |
53 'action_name': 'create_khronos_symlinks_gles2', | |
54 'variables': { | |
55 'dummy_file': '<(khronos_headers_symlink_target)/.dummy_gles2', | |
56 }, | |
57 'inputs': [ | |
58 'khronos.gyp', | |
59 ], | |
60 'outputs': [ | |
61 '<(dummy_file)', | |
62 ], | |
63 'action': [ | |
64 '../../build/symlink.py', | |
65 '--force', | |
66 '--touch', '<(dummy_file)', | |
67 '<(khronos_headers_symlink_source)/GLES2', | |
68 '<(khronos_headers_symlink_target)', | |
69 ], | |
70 'message': 'Creating GLES2 headers symlinks.', | |
71 }, | |
72 { | |
73 'action_name': 'create_khronos_symlinks_khr', | |
74 'variables': { | |
75 'dummy_file': '<(khronos_headers_symlink_target)/.dummy_khr', | |
76 }, | |
77 'inputs': [ | |
78 'khronos.gyp', | |
79 ], | |
80 'outputs': [ | |
81 '<(dummy_file)', | |
82 ], | |
83 'action': [ | |
84 '../../build/symlink.py', | |
85 '--force', | |
86 '--touch', '<(dummy_file)', | |
87 '<(khronos_headers_symlink_source)/KHR', | |
88 '<(khronos_headers_symlink_target)', | |
89 ], | |
90 'message': 'Creating KHR headers symlinks.', | |
91 }, | |
92 ], | |
93 }, | |
94 ], | |
95 }], | |
96 ], | 17 ], |
97 } | 18 } |
OLD | NEW |