summaryrefslogtreecommitdiff
path: root/chromium/remoting/client/display/BUILD.gn
blob: 9716d4cd0849e5bcadb2d3a3a4c3cad57e760f86 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright 2014 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.

source_set("display") {
  sources = [
    "canvas.h",
    "drawable.h",
    "gl_canvas.cc",
    "gl_canvas.h",
    "gl_cursor.cc",
    "gl_cursor.h",
    "gl_cursor_feedback.cc",
    "gl_cursor_feedback.h",
    "gl_cursor_feedback_texture.cc",
    "gl_cursor_feedback_texture.h",
    "gl_desktop.cc",
    "gl_desktop.h",
    "gl_helpers.cc",
    "gl_helpers.h",
    "gl_math.cc",
    "gl_math.h",
    "gl_render_layer.cc",
    "gl_render_layer.h",
    "gl_renderer.cc",
    "gl_renderer.h",
    "sys_opengl.h",
  ]

  deps = [
    "//remoting/proto",
    "//third_party/libyuv",
    "//third_party/webrtc/base:rtc_base",
  ]

  public_configs = [ "//third_party/khronos:khronos_headers" ]

  if (is_android) {
    libs = [ "GLESv2" ]
  }

  if (is_linux) {
    libs = [ "GL" ]
  }

  if (is_mac) {
    libs = [ "OpenGL.framework" ]
  }

  if (is_ios) {
    libs = [
      "GLKit.framework",
      "OpenGLES.framework",
    ]
  }

  if (is_win) {
    deps += [ "//third_party/angle:libGLESv2" ]
  }
}

if (is_win) {
  # Windows clang builder fails to link the test binary with ANGLE GLESv2.
  # crbug.com/642027
  group("unit_tests") {
    deps = []
  }
} else {
  source_set("unit_tests") {
    testonly = true

    sources = [
      "fake_canvas.cc",
      "fake_canvas.h",
      "gl_renderer_unittest.cc",
    ]

    configs += [
      "//remoting/build/config:version",
      "//remoting/build/config:enable_webrtc_remoting_client",
    ]

    deps = [
      ":display",
      "//remoting/proto",
      "//testing/gmock",
      "//testing/gtest",
      "//third_party/webrtc/base:rtc_base",
    ]
  }
}