summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 00:31:48 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-21 00:31:48 +0000
commit9ffb05d3f5d550c4c3219404bf41841bde3edc90 (patch)
tree37652cef3351edd8399c2fcfeeee4a4a5ecb428f
parent0ed0b7e7673321d88c2aacdd1034086e138a6688 (diff)
downloadchromium_src-9ffb05d3f5d550c4c3219404bf41841bde3edc90.zip
chromium_src-9ffb05d3f5d550c4c3219404bf41841bde3edc90.tar.gz
chromium_src-9ffb05d3f5d550c4c3219404bf41841bde3edc90.tar.bz2
Encapsulate khronos include paths in khronos.gyp,
instead of hardcoding it all over the place (literally). This is one of the steps towards use_system_mesa build option. BUG=161389 Review URL: https://chromiumcodereview.appspot.com/11416085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168931 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--gpu/command_buffer/command_buffer.gyp6
-rw-r--r--gpu/command_buffer/command_buffer.gypi3
-rw-r--r--gpu/command_buffer/command_buffer_untrusted.gyp1
-rw-r--r--gpu/command_buffer_client.gypi5
-rw-r--r--gpu/command_buffer_common.gypi9
-rw-r--r--gpu/command_buffer_service.gypi5
-rw-r--r--gpu/gles2_conform_support/gles2_conform_support.gyp33
-rw-r--r--gpu/gpu.gyp23
-rw-r--r--gpu/gpu_ipc.gypi2
-rw-r--r--gpu/gpu_untrusted.gyp4
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy_untrusted.gyp2
-rw-r--r--ppapi/ppapi_ipc_proxy_untrusted.gyp2
-rw-r--r--ppapi/ppapi_shared_untrusted.gyp2
-rw-r--r--third_party/khronos/khronos.gyp36
14 files changed, 66 insertions, 67 deletions
diff --git a/gpu/command_buffer/command_buffer.gyp b/gpu/command_buffer/command_buffer.gyp
index 7a4c10a..382cd51 100644
--- a/gpu/command_buffer/command_buffer.gyp
+++ b/gpu/command_buffer/command_buffer.gyp
@@ -16,13 +16,9 @@
'variables': {
'gles2_utils_target': 1,
},
- 'all_dependent_settings': {
- 'include_dirs': [
- '<(DEPTH)/third_party/khronos',
- ],
- },
'dependencies': [
'../../base/base.gyp:base',
+ '../../third_party/khronos/khronos.gyp:headers',
],
'export_dependent_settings': [
'../../base/base.gyp:base',
diff --git a/gpu/command_buffer/command_buffer.gypi b/gpu/command_buffer/command_buffer.gypi
index 057a7ce..227f508 100644
--- a/gpu/command_buffer/command_buffer.gypi
+++ b/gpu/command_buffer/command_buffer.gypi
@@ -13,9 +13,6 @@
'defines': [
'GLES2_UTILS_IMPLEMENTATION',
],
- 'include_dirs': [
- '<(DEPTH)/third_party/khronos',
- ],
'sources': [
'common/gles2_cmd_format.h',
'common/gles2_cmd_utils.cc',
diff --git a/gpu/command_buffer/command_buffer_untrusted.gyp b/gpu/command_buffer/command_buffer_untrusted.gyp
index 553af5a..f9da966 100644
--- a/gpu/command_buffer/command_buffer_untrusted.gyp
+++ b/gpu/command_buffer/command_buffer_untrusted.gyp
@@ -26,6 +26,7 @@
'dependencies': [
'../../native_client/tools.gyp:prep_toolchain',
'../../base/base_untrusted.gyp:base_untrusted',
+ '../../third_party/khronos/khronos.gyp:headers',
],
},
],
diff --git a/gpu/command_buffer_client.gypi b/gpu/command_buffer_client.gypi
index 97484f6..f3d379f 100644
--- a/gpu/command_buffer_client.gypi
+++ b/gpu/command_buffer_client.gypi
@@ -5,14 +5,15 @@
{
'include_dirs': [
'..',
- '<(DEPTH)/third_party/khronos',
],
'all_dependent_settings': {
'include_dirs': [
'..',
- '<(DEPTH)/third_party/khronos',
],
},
+ 'dependencies': [
+ '../third_party/khronos/khronos.gyp:headers',
+ ],
'sources': [
'command_buffer/client/atomicops.cc',
'command_buffer/client/atomicops.h',
diff --git a/gpu/command_buffer_common.gypi b/gpu/command_buffer_common.gypi
index b8047b2..3134a2a 100644
--- a/gpu/command_buffer_common.gypi
+++ b/gpu/command_buffer_common.gypi
@@ -3,14 +3,9 @@
# found in the LICENSE file.
{
- 'include_dirs': [
- '<(DEPTH)/third_party/khronos',
+ 'dependencies': [
+ '../third_party/khronos/khronos.gyp:headers',
],
- 'all_dependent_settings': {
- 'include_dirs': [
- '<(DEPTH)/third_party/khronos',
- ],
- },
'sources': [
'command_buffer/common/bitfield_helpers.h',
'command_buffer/common/buffer.h',
diff --git a/gpu/command_buffer_service.gypi b/gpu/command_buffer_service.gypi
index b26d253..57fde5b 100644
--- a/gpu/command_buffer_service.gypi
+++ b/gpu/command_buffer_service.gypi
@@ -5,12 +5,10 @@
{
'include_dirs': [
'..',
- '<(DEPTH)/third_party/khronos',
],
'all_dependent_settings': {
'include_dirs': [
'..',
- '<(DEPTH)/third_party/khronos',
],
},
'dependencies': [
@@ -21,6 +19,7 @@
'../ui/surface/surface.gyp:surface',
'../ui/ui.gyp:ui',
'../third_party/angle/src/build_angle.gyp:translator_glsl',
+ '../third_party/khronos/khronos.gyp:headers',
'../third_party/smhasher/smhasher.gyp:cityhash',
],
'sources': [
@@ -110,7 +109,7 @@
}],
['ui_compositor_image_transport==1', {
'include_dirs': [
- '<(DEPTH)/third_party/angle/include',
+ '../third_party/angle/include',
],
}],
],
diff --git a/gpu/gles2_conform_support/gles2_conform_support.gyp b/gpu/gles2_conform_support/gles2_conform_support.gyp
index 54e5e58..ae4683a 100644
--- a/gpu/gles2_conform_support/gles2_conform_support.gyp
+++ b/gpu/gles2_conform_support/gles2_conform_support.gyp
@@ -30,14 +30,14 @@
'target_name': 'egl_native',
'type': 'static_library',
'dependencies': [
- '<(DEPTH)/base/base.gyp:base',
- '<(DEPTH)/gpu/gpu.gyp:gpu',
- '<(DEPTH)/gpu/gpu.gyp:gles2_implementation_client_side_arrays_no_check',
- '<(DEPTH)/gpu/gpu.gyp:command_buffer_service',
- '<(DEPTH)/ui/gl/gl.gyp:gl',
- '<(DEPTH)/ui/ui.gyp:ui',
+ '../../base/base.gyp:base',
+ '../../gpu/gpu.gyp:gpu',
+ '../../gpu/gpu.gyp:gles2_implementation_client_side_arrays_no_check',
+ '../../gpu/gpu.gyp:command_buffer_service',
+ '../../third_party/khronos/khronos.gyp:headers',
+ '../../ui/gl/gl.gyp:gl',
+ '../../ui/ui.gyp:ui',
],
- 'include_dirs': ['<(DEPTH)/third_party/khronos'],
'sources': [
'egl/config.cc',
'egl/config.h',
@@ -47,9 +47,6 @@
'egl/surface.cc',
'egl/surface.h',
],
- 'direct_dependent_settings': {
- 'include_dirs': ['<(DEPTH)/third_party/khronos'],
- },
'defines': [
'EGLAPI=',
'EGLAPIENTRY=',
@@ -60,19 +57,16 @@
'type': 'static_library',
'dependencies': [
'egl_native',
+ '../../third_party/khronos/khronos.gyp:headers',
],
'conditions': [
['toolkit_uses_gtk == 1', {
'dependencies': ['../../build/linux/system.gyp:gtk'],
}],
],
- 'include_dirs': ['<(DEPTH)/third_party/khronos'],
'sources': [
'<@(bootstrap_sources_native)',
],
- 'direct_dependent_settings': {
- 'include_dirs': ['<(DEPTH)/third_party/khronos'],
- },
'defines': [
'GLES2_CONFORM_SUPPORT_ONLY',
'GTF_GLES20',
@@ -85,22 +79,19 @@
'type': 'static_library',
'dependencies': [
'egl_native',
+ '../../third_party/khronos/khronos.gyp:headers',
],
'conditions': [
['toolkit_uses_gtk == 1', {
'dependencies': ['../../build/linux/system.gyp:gtk'],
}],
],
- 'include_dirs': ['<(DEPTH)/third_party/khronos'],
'sources': [
'native/main.cc',
'native/egl_native.cc',
'native/egl_native_windowless.cc',
'<@(bootstrap_sources_native)',
],
- 'direct_dependent_settings': {
- 'include_dirs': ['<(DEPTH)/third_party/khronos'],
- },
'defines': [
'GLES2_CONFORM_SUPPORT_ONLY',
'GTF_GLES20',
@@ -113,9 +104,9 @@
'type': 'executable',
'dependencies': [
'egl_native',
- '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
- '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib_nocheck',
- '<(DEPTH)/third_party/expat/expat.gyp:expat',
+ '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
+ '../../gpu/gpu.gyp:gles2_c_lib_nocheck',
+ '../../third_party/expat/expat.gyp:expat',
],
'conditions': [
['toolkit_uses_gtk == 1', {
diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp
index 437ce51..39feafa 100644
--- a/gpu/gpu.gyp
+++ b/gpu/gpu.gyp
@@ -16,16 +16,11 @@
'type': '<(component)',
'dependencies': [
'../base/base.gyp:base',
+ '../third_party/khronos/khronos.gyp:headers',
'../ui/gl/gl.gyp:gl',
'command_buffer/command_buffer.gyp:gles2_utils',
'gles2_cmd_helper',
],
- 'all_dependent_settings': {
- 'include_dirs': [
- # For GLES2/gl2.h
- '<(DEPTH)/third_party/khronos',
- ],
- },
'defines': [
'GLES2_IMPL_IMPLEMENTATION',
],
@@ -43,16 +38,11 @@
],
'dependencies': [
'../base/base.gyp:base',
+ '../third_party/khronos/khronos.gyp:headers',
'../ui/gl/gl.gyp:gl',
'command_buffer/command_buffer.gyp:gles2_utils',
'gles2_cmd_helper',
],
- 'all_dependent_settings': {
- 'include_dirs': [
- # For GLES2/gl2.h
- '<(DEPTH)/third_party/khronos',
- ],
- },
'sources': [
'<@(gles2_implementation_source_files)',
],
@@ -68,15 +58,10 @@
],
'dependencies': [
'../base/base.gyp:base',
+ '../third_party/khronos/khronos.gyp:headers',
'command_buffer/command_buffer.gyp:gles2_utils',
'gles2_cmd_helper',
],
- 'all_dependent_settings': {
- 'include_dirs': [
- # For GLES2/gl2.h
- '<(DEPTH)/third_party/khronos',
- ],
- },
'sources': [
'<@(gles2_implementation_source_files)',
],
@@ -268,11 +253,11 @@
'dependencies': [
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
+ '../third_party/khronos/khronos.gyp:headers',
'../ui/gl/gl.gyp:gl',
],
'include_dirs': [
'..',
- '<(DEPTH)/third_party/khronos',
],
'sources': [
'command_buffer/common/gl_mock.h',
diff --git a/gpu/gpu_ipc.gypi b/gpu/gpu_ipc.gypi
index 8bf0ac1..de287ab 100644
--- a/gpu/gpu_ipc.gypi
+++ b/gpu/gpu_ipc.gypi
@@ -5,10 +5,10 @@
{
'dependencies': [
'../ipc/ipc.gyp:ipc',
+ '../third_party/khronos/khronos.gyp:headers',
],
'include_dirs': [
'..',
- '<(DEPTH)/third_party/khronos',
],
'sources': [
'ipc/command_buffer_proxy.h',
diff --git a/gpu/gpu_untrusted.gyp b/gpu/gpu_untrusted.gyp
index 0d4a434..1f92721 100644
--- a/gpu/gpu_untrusted.gyp
+++ b/gpu/gpu_untrusted.gyp
@@ -27,15 +27,13 @@
'defines': [
'GLES2_IMPL_IMPLEMENTATION',
],
- 'include_dirs': [
- '../third_party/khronos',
- ],
'sources': [
'<@(gles2_implementation_source_files)',
],
'dependencies': [
'../native_client/tools.gyp:prep_toolchain',
'../base/base_untrusted.gyp:base_untrusted',
+ '../third_party/khronos/khronos.gyp:headers',
'command_buffer/command_buffer_untrusted.gyp:gles2_utils_untrusted',
'gles2_cmd_helper_untrusted',
],
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy_untrusted.gyp b/ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy_untrusted.gyp
index 07966ab..9bfc97f 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy_untrusted.gyp
+++ b/ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy_untrusted.gyp
@@ -13,6 +13,7 @@
'dependencies': [
'<(DEPTH)/native_client/tools.gyp:prep_toolchain',
'<(DEPTH)/media/media_untrusted.gyp:shared_memory_support_untrusted',
+ '<(DEPTH)/third_party/khronos/khronos.gyp:headers',
],
'variables': {
'nlib_target': 'libppruntime.a',
@@ -21,7 +22,6 @@
'include_dirs': [
'<(DEPTH)/gpu',
'<(DEPTH)/media',
- '<(DEPTH)/third_party/khronos',
'<(DEPTH)/ppapi/native_client/src/shared/ppapi_proxy/untrusted',
],
'sources': [
diff --git a/ppapi/ppapi_ipc_proxy_untrusted.gyp b/ppapi/ppapi_ipc_proxy_untrusted.gyp
index d2f7fa2..5f416c7 100644
--- a/ppapi/ppapi_ipc_proxy_untrusted.gyp
+++ b/ppapi/ppapi_ipc_proxy_untrusted.gyp
@@ -36,7 +36,6 @@
},
'include_dirs': [
'..',
- '../third_party/khronos',
],
'dependencies': [
'../native_client/tools.gyp:prep_toolchain',
@@ -50,6 +49,7 @@
'../ipc/ipc_untrusted.gyp:ipc_untrusted',
'../ppapi/ppapi_shared_untrusted.gyp:ppapi_shared_untrusted',
'../ppapi/ppapi_ipc_untrusted.gyp:ppapi_ipc_untrusted',
+ '../third_party/khronos/khronos.gyp:headers',
],
},
],
diff --git a/ppapi/ppapi_shared_untrusted.gyp b/ppapi/ppapi_shared_untrusted.gyp
index ef76bd3..25fd763 100644
--- a/ppapi/ppapi_shared_untrusted.gyp
+++ b/ppapi/ppapi_shared_untrusted.gyp
@@ -32,7 +32,6 @@
},
'include_dirs': [
'..',
- '../third_party/khronos',
],
'dependencies': [
'../native_client/tools.gyp:prep_toolchain',
@@ -41,6 +40,7 @@
'../gpu/gpu_untrusted.gyp:command_buffer_client_untrusted',
'../gpu/gpu_untrusted.gyp:gles2_implementation_untrusted',
'../media/media_untrusted.gyp:shared_memory_support_untrusted',
+ '../third_party/khronos/khronos.gyp:headers',
],
},
],
diff --git a/third_party/khronos/khronos.gyp b/third_party/khronos/khronos.gyp
new file mode 100644
index 0000000..1cb7378
--- /dev/null
+++ b/third_party/khronos/khronos.gyp
@@ -0,0 +1,36 @@
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'use_system_khronos%': 0,
+ },
+ 'conditions': [
+ ['use_system_khronos==0', {
+ 'targets': [
+ {
+ 'target_name': 'headers',
+ 'type': 'none',
+ 'all_dependent_settings': {
+ 'include_dirs': [
+ '.',
+ ],
+ },
+ },
+ ],
+ }, { # use_system_khronos==1
+ 'targets': [
+ {
+ 'target_name': 'headers',
+ 'type': 'none',
+ 'all_dependent_settings': {
+ 'include_dirs': [
+ '/usr/include',
+ ],
+ },
+ },
+ ],
+ }],
+ ],
+}