| 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 'variables': { | |
| 7 'use_system_khronos%': 0, | |
| 8 }, | |
| 9 'conditions': [ | 6 'conditions': [ |
| 10 ['use_system_khronos==0', { | 7 ['use_system_mesa==0', { |
| 11 'targets': [ | 8 'targets': [ |
| 12 { | 9 { |
| 13 'target_name': 'khronos_headers', | 10 'target_name': 'khronos_headers', |
| 14 'type': 'none', | 11 'type': 'none', |
| 15 'all_dependent_settings': { | 12 'all_dependent_settings': { |
| 16 'include_dirs': [ | 13 'include_dirs': [ |
| 17 '.', | 14 '.', |
| 18 '../../gpu', # Contains GLES2/gl2chromium.h | 15 '../../gpu', # Contains GLES2/gl2chromium.h |
| 19 ], | 16 ], |
| 20 }, | 17 }, |
| 21 }, | 18 }, |
| 22 ], | 19 ], |
| 23 }, { # use_system_khronos==1 | 20 }, { # use_system_mesa==1 |
| 24 'targets': [ | 21 'targets': [ |
| 25 { | 22 { |
| 26 'target_name': 'khronos_headers', | 23 'target_name': 'khronos_headers', |
| 27 'type': 'none', | 24 'type': 'none', |
| 28 'variables': { | 25 'variables': { |
| 29 'headers_root_path': '../..', | 26 'headers_root_path': '../..', |
| 30 'header_filenames': [ | 27 'header_filenames': [ |
| 31 'GLES2/gl2.h;<GLES2/gl2chromium.h>;', | 28 'GLES2/gl2.h;<GLES2/gl2chromium.h>;', |
| 32 'GLES2/gl2ext.h;<GLES2/gl2chromium.h>;<GLES2/gl2extchromium.h>', | 29 'GLES2/gl2ext.h;<GLES2/gl2chromium.h>;<GLES2/gl2extchromium.h>', |
| 33 ], | 30 ], |
| 34 'shim_generator_additional_args': [ | 31 'shim_generator_additional_args': [ |
| 35 '--headers-root', '.', | 32 '--headers-root', '.', |
| 36 '--use-include-next', | 33 '--use-include-next', |
| 37 ], | 34 ], |
| 35 'khronos_headers_symlink_source%': '/usr/include', |
| 36 'khronos_headers_symlink_target': '<(SHARED_INTERMEDIATE_DIR)/khrono
s_symlinks', |
| 38 }, | 37 }, |
| 39 'includes': [ | 38 'includes': [ |
| 40 '../../build/shim_headers.gypi', | 39 '../../build/shim_headers.gypi', |
| 41 ], | 40 ], |
| 42 'all_dependent_settings': { | 41 'all_dependent_settings': { |
| 43 'include_dirs': [ | 42 'include_dirs': [ |
| 43 '<(khronos_headers_symlink_target)', |
| 44 '../../gpu', # Contains GLES2/gl2chromium.h | 44 '../../gpu', # Contains GLES2/gl2chromium.h |
| 45 ], | 45 ], |
| 46 }, | 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 ], |
| 47 }, | 93 }, |
| 48 ], | 94 ], |
| 49 }], | 95 }], |
| 50 ], | 96 ], |
| 51 } | 97 } |
| OLD | NEW |