summaryrefslogtreecommitdiff
path: root/chromium/ui/gl/init/BUILD.gn
blob: d55a06bf481296dd769d8259e3c79bed4220f471 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# 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/jumbo.gni")
import("//build/config/ui.gni")

jumbo_component("init") {
  output_name = "gl_init"

  public = [
    "create_gr_gl_interface.h",
    "gl_factory.h",
  ]

  sources = [
    "create_gr_gl_interface.cc",
    "create_gr_gl_interface.h",
    "gl_factory.cc",
    "gl_factory.h",
    "gl_init_export.h",
    "gl_initializer.h",
  ]
  defines = [ "GL_INIT_IMPLEMENTATION" ]

  deps = [
    "//base",
    "//ui/gfx",
    "//ui/gl:gl_features",
  ]

  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",
    ]

    libs = [ "dwmapi.lib" ]
    ldflags = [ "/DELAYLOAD:dwmapi.dll" ]
  } 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",
    ]

    deps += [ "//ui/gfx/x" ]
  } else if (use_ozone) {
    sources += [
      "gl_factory_ozone.cc",
      "gl_initializer_ozone.cc",
      "ozone_util.h",
    ]

    deps += [ "//ui/ozone" ]
  }
}