diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-22 17:57:14 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-22 17:57:14 +0000 |
commit | a2e338edf518966c249037d474bc2c4cb8424164 (patch) | |
tree | 9357491c812524fc9ff2df8a224e460dc3525661 /third_party/khronos | |
parent | 22c50ca02cff7649dc812786e870a1840c471ffd (diff) | |
download | chromium_src-a2e338edf518966c249037d474bc2c4cb8424164.zip chromium_src-a2e338edf518966c249037d474bc2c4cb8424164.tar.gz chromium_src-a2e338edf518966c249037d474bc2c4cb8424164.tar.bz2 |
Make use_system_mesa switch work: make symlinks
for nacl untrusted build.
BUG=161389
Review URL: https://codereview.chromium.org/11862016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178028 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/khronos')
-rw-r--r-- | third_party/khronos/khronos.gyp | 56 |
1 files changed, 51 insertions, 5 deletions
diff --git a/third_party/khronos/khronos.gyp b/third_party/khronos/khronos.gyp index 0abcfa3..bac7eb8 100644 --- a/third_party/khronos/khronos.gyp +++ b/third_party/khronos/khronos.gyp @@ -3,11 +3,8 @@ # found in the LICENSE file. { - 'variables': { - 'use_system_khronos%': 0, - }, 'conditions': [ - ['use_system_khronos==0', { + ['use_system_mesa==0', { 'targets': [ { 'target_name': 'khronos_headers', @@ -20,7 +17,7 @@ }, }, ], - }, { # use_system_khronos==1 + }, { # use_system_mesa==1 'targets': [ { 'target_name': 'khronos_headers', @@ -35,15 +32,64 @@ '--headers-root', '.', '--use-include-next', ], + 'khronos_headers_symlink_source%': '/usr/include', + 'khronos_headers_symlink_target': '<(SHARED_INTERMEDIATE_DIR)/khronos_symlinks', }, 'includes': [ '../../build/shim_headers.gypi', ], 'all_dependent_settings': { 'include_dirs': [ + '<(khronos_headers_symlink_target)', '../../gpu', # Contains GLES2/gl2chromium.h ], }, + 'actions': [ + # Symlink system headers into include paths so that nacl + # untrusted build can use them. Adding system include paths + # to nacl untrusted build include path would break the build, + # so we only add needed parts. + { + 'action_name': 'create_khronos_symlinks_gles2', + 'variables': { + 'dummy_file': '<(khronos_headers_symlink_target)/.dummy_gles2', + }, + 'inputs': [ + 'khronos.gyp', + ], + 'outputs': [ + '<(dummy_file)', + ], + 'action': [ + '../../build/symlink.py', + '--force', + '--touch', '<(dummy_file)', + '<(khronos_headers_symlink_source)/GLES2', + '<(khronos_headers_symlink_target)', + ], + 'message': 'Creating GLES2 headers symlinks.', + }, + { + 'action_name': 'create_khronos_symlinks_khr', + 'variables': { + 'dummy_file': '<(khronos_headers_symlink_target)/.dummy_khr', + }, + 'inputs': [ + 'khronos.gyp', + ], + 'outputs': [ + '<(dummy_file)', + ], + 'action': [ + '../../build/symlink.py', + '--force', + '--touch', '<(dummy_file)', + '<(khronos_headers_symlink_source)/KHR', + '<(khronos_headers_symlink_target)', + ], + 'message': 'Creating KHR headers symlinks.', + }, + ], }, ], }], |