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
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167

remoting / BUILD.gn [blame]

# Copyright 2015 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/chromeos/ui_mode.gni")
import("//remoting/build/config/remoting_build.gni")

group("remoting_all") {
  testonly = true

  deps = [ ":remoting_unittests" ]

  if (is_win) {
    deps += [
      "//remoting/host/win:all",
      "//remoting/tools:remoting_breakpad_tester",
    ]

    if (is_chrome_branded) {
      deps += [ "//remoting/host:remoting_host_installation" ]
    }
  }

  if (enable_remoting_host) {
    deps += [
      ":remoting_perftests",
      "//remoting/host",
    ]

    if (!is_chromeos_ash && !is_android) {
      deps += [
        "//remoting/host:remoting_native_messaging_manifests",
        "//remoting/host:remoting_start_host",
      ]

      # it2me.
      deps += [ "//remoting/host/it2me:remote_assistance_host" ]
      if (is_win) {
        deps += [ "//remoting/host/it2me:remote_assistance_host_uiaccess" ]
      }
    }

    if (is_linux) {
      deps += [
        "//remoting/host/crash:crash_tools",
        "//remoting/host/linux:remoting_dev_me2me_host",
        "//remoting/host/linux:remoting_user_session",
      ]
    }

    if (use_glib) {
      deps += [ "//remoting/host/linux/dbus_interfaces:gen_dbus_interface" ]
    }
  }

  if (enable_me2me_host) {
    deps += [ "//remoting/host:remoting_me2me_host" ]
    if (is_chrome_branded) {
      deps += [ "//remoting/host:remoting_me2me_host_archive" ]
    }
  }
}

group("test_support") {
  testonly = true

  deps = [
    "//base",
    "//net",
    "//remoting/base:test_support",
    "//remoting/codec:decoder",
    "//remoting/codec:encoder",
    "//remoting/protocol:test_support",
    "//remoting/resources",
    "//remoting/signaling:test_support",
    "//remoting/test:test_support",
    "//testing/gmock",
    "//testing/gtest",
  ]

  if (enable_remoting_host) {
    deps += [ "//remoting/host:test_support" ]
  }
}

test("remoting_unittests") {
  defines = []
  libs = []

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

  deps = [
    ":test_support",
    "//base",
    "//base/test:test_support",
    "//google_apis",
    "//remoting/base:unit_tests",
    "//remoting/protocol:unit_tests",
    "//remoting/signaling:unit_tests",
    "//testing/gmock",
    "//testing/gtest",
  ]

  if (enable_remoting_host) {
    deps += [
      "//remoting/codec:unit_tests",
      "//remoting/host:unit_tests",
      "//ui/gfx",
    ]
  }

  deps += [ "//third_party/webrtc_overrides:webrtc_component" ]

  if (is_android) {
    deps += [ "//net/android:net_java" ]

    libs += [ "android" ]
  }

  if (is_win) {
    defines += [ "_ALT_NO_EXCEPTIONS" ]

    libs += [
      "comctl32.lib",
      "rpcrt4.lib",
      "wtsapi32.lib",
    ]
  }
}

if (enable_remoting_host) {
  test("remoting_perftests") {
    defines = []
    libs = []

    sources = [ "test/codec_perftest.cc" ]

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

    deps = [
      ":test_support",
      "//base",
      "//base/test:run_all_unittests",
      "//base/test:test_support",
      "//components/webrtc:thread_wrapper",
      "//net:test_support",
      "//remoting/base",
      "//remoting/codec:encoder",
      "//remoting/host:common",
      "//remoting/host:test_support",
      "//remoting/protocol:protocol",
      "//remoting/signaling:test_support",
      "//remoting/test:test_support",
      "//testing/gtest",
      "//third_party/webrtc_overrides:webrtc_component",
    ]

    if (is_win) {
      defines += [ "_ALT_NO_EXCEPTIONS" ]

      libs += [
        "rpcrt4.lib",
        "wtsapi32.lib",
      ]
    }
  }
}