| # Copyright 2016 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. |
| |
| import("//build/config/ui.gni") |
| |
| component("init") { |
| output_name = "gl_init" |
| |
| public = [ |
| "gl_factory.h", |
| ] |
| |
| sources = [ |
| "gl_factory.cc", |
| "gl_init_export.h", |
| "gl_initializer.h", |
| ] |
| defines = [ "GL_INIT_IMPLEMENTATION" ] |
| |
| deps = [ |
| "//base", |
| "//ui/gfx", |
| ] |
| |
| public_deps = [ |
| "//ui/gl", |
| ] |
| |
| if (is_android) { |
| sources += [ |
| "gl_factory_android.cc", |
| "gl_initializer_android.cc", |
| ] |
| } else if (is_win) { |
| sources += [ |
| "gl_factory_win.cc", |
| "gl_initializer_win.cc", |
| ] |
| } else if (is_mac) { |
| sources += [ |
| "gl_factory_mac.cc", |
| "gl_initializer_mac.cc", |
| ] |
| |
| libs = [ "OpenGL.framework" ] |
| } else if (use_x11) { |
| sources += [ |
| "gl_factory_x11.cc", |
| "gl_initializer_x11.cc", |
| ] |
| } else if (use_ozone) { |
| sources += [ |
| "gl_factory_ozone.cc", |
| "gl_initializer_ozone.cc", |
| "gl_surface_ozone.cc", |
| "gl_surface_ozone.h", |
| ] |
| |
| deps += [ "//ui/ozone" ] |
| } |
| } |