OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2011 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. |
| 4 |
| 5 { |
| 6 'target_defaults': { |
| 7 'sources/': [ |
| 8 ['exclude', '/(cocoa|gtk|win)/'], |
| 9 ['exclude', '_(cocoa|gtk|linux|mac|posix|win|x)\\.(cc|mm?)$'], |
| 10 ['exclude', '/(gtk|win|x11)_[^/]*\\.cc$'], |
| 11 ], |
| 12 'conditions': [ |
| 13 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {'sources/': [ |
| 14 ['include', '/gtk/'], |
| 15 ['include', '_(gtk|linux|posix|skia|x)\\.cc$'], |
| 16 ['include', '/(gtk|x11)_[^/]*\\.cc$'], |
| 17 ]}], |
| 18 ['OS=="mac"', {'sources/': [ |
| 19 ['include', '/cocoa/'], |
| 20 ['include', '_(cocoa|mac|posix)\\.(cc|mm?)$'], |
| 21 ]}, { # else: OS != "mac" |
| 22 'sources/': [ |
| 23 ['exclude', '\\.mm?$'], |
| 24 ], |
| 25 }], |
| 26 ['OS=="win"', |
| 27 {'sources/': [ |
| 28 ['include', '_(win)\\.cc$'], |
| 29 ['include', '/win/'], |
| 30 ['include', '/win_[^/]*\\.cc$'], |
| 31 ]}], |
| 32 ], |
| 33 }, |
| 34 'targets': [ |
| 35 { |
| 36 'target_name': 'gl', |
| 37 'type': '<(library)', |
| 38 'dependencies': [ |
| 39 '<(DEPTH)/app/app.gyp:app_base', |
| 40 '<(DEPTH)/base/base.gyp:base', |
| 41 '<(DEPTH)/skia/skia.gyp:skia', |
| 42 '<(DEPTH)/ui/ui.gyp:ui_gfx', |
| 43 ], |
| 44 'variables': { |
| 45 'gl_binding_output_dir': '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gl', |
| 46 }, |
| 47 'include_dirs': [ |
| 48 '<(DEPTH)/third_party/mesa/MesaLib/include', |
| 49 '<(gl_binding_output_dir)', |
| 50 ], |
| 51 'direct_dependent_settings': { |
| 52 'include_dirs': [ |
| 53 '<(DEPTH)/third_party/mesa/MesaLib/include', |
| 54 '<(gl_binding_output_dir)', |
| 55 ], |
| 56 }, |
| 57 'sources': [ |
| 58 'gl_bindings.gypi', |
| 59 'gl_bindings.h', |
| 60 'gl_bindings_skia.cc', |
| 61 'gl_bindings_skia.h', |
| 62 'gl_context.cc', |
| 63 'gl_context.h', |
| 64 'gl_context_linux.cc', |
| 65 'gl_context_mac.cc', |
| 66 'gl_context_osmesa.cc', |
| 67 'gl_context_osmesa.h', |
| 68 'gl_context_stub.cc', |
| 69 'gl_context_stub.h', |
| 70 'gl_context_win.cc', |
| 71 'gl_implementation.cc', |
| 72 'gl_implementation.h', |
| 73 'gl_implementation_linux.cc', |
| 74 'gl_implementation_mac.cc', |
| 75 'gl_implementation_win.cc', |
| 76 'gl_interface.cc', |
| 77 'gl_interface.h', |
| 78 'gl_switches.cc', |
| 79 'gl_switches.h', |
| 80 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc', |
| 81 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h', |
| 82 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc', |
| 83 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc', |
| 84 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h', |
| 85 ], |
| 86 # hard_dependency is necessary for this target because it has actions |
| 87 # that generate header files included by dependent targets. The header |
| 88 # files must be generated before the dependents are compiled. The usual |
| 89 # semantics are to allow the two targets to build concurrently. |
| 90 'hard_dependency': 1, |
| 91 'actions': [ |
| 92 { |
| 93 'action_name': 'generate_gl_bindings', |
| 94 'inputs': [ |
| 95 'generate_bindings.py', |
| 96 ], |
| 97 'outputs': [ |
| 98 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc', |
| 99 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h', |
| 100 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.cc', |
| 101 '<(gl_binding_output_dir)/gl_bindings_autogen_gl.h', |
| 102 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc', |
| 103 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h', |
| 104 '<(gl_binding_output_dir)/gl_bindings_autogen_mock.cc', |
| 105 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.cc', |
| 106 '<(gl_binding_output_dir)/gl_bindings_autogen_osmesa.h', |
| 107 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc', |
| 108 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h', |
| 109 ], |
| 110 'action': [ |
| 111 'python', |
| 112 'generate_bindings.py', |
| 113 '<(gl_binding_output_dir)', |
| 114 ], |
| 115 }, |
| 116 ], |
| 117 'conditions': [ |
| 118 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
| 119 'sources': [ |
| 120 'gl_context_egl.cc', |
| 121 'gl_context_egl.h', |
| 122 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc', |
| 123 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h', |
| 124 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.cc', |
| 125 '<(gl_binding_output_dir)/gl_bindings_autogen_glx.h', |
| 126 ], |
| 127 'include_dirs': [ |
| 128 # We don't use angle, but pull the EGL/GLES headers from there. |
| 129 '<(DEPTH)/third_party/angle/include', |
| 130 ], |
| 131 'all_dependent_settings': { |
| 132 'defines': [ |
| 133 'GL_GLEXT_PROTOTYPES', |
| 134 ], |
| 135 }, |
| 136 }], |
| 137 ['OS=="mac"', { |
| 138 'link_settings': { |
| 139 'libraries': [ |
| 140 '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', |
| 141 ], |
| 142 }, |
| 143 }], |
| 144 ['OS=="win"', { |
| 145 'sources': [ |
| 146 'gl_context_egl.cc', |
| 147 'gl_context_egl.h', |
| 148 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.cc', |
| 149 '<(gl_binding_output_dir)/gl_bindings_autogen_egl.h', |
| 150 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.cc', |
| 151 '<(gl_binding_output_dir)/gl_bindings_autogen_wgl.h', |
| 152 ], |
| 153 'include_dirs': [ |
| 154 '<(DEPTH)/third_party/angle/include', |
| 155 ], |
| 156 }], |
| 157 ], |
| 158 }, |
| 159 ], |
| 160 } |
OLD | NEW |