# 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/ios/rules.gni")

group("all") {
  testonly = true

  deps = [
    ":bridge",
    ":bridge_unit_tests",
  ]
}

source_set("bridge") {
  include_dirs = [
    "$root_gen_dir",
    "//third_party/protobuf/src",
  ]

  sources = [
    "client_instance.cc",
    "client_instance.h",
    "client_proxy.h",
    "client_proxy.mm",
    "client_proxy_delegate.h",
    "client_proxy_delegate_wrapper.h",
    "client_proxy_delegate_wrapper.mm",
    "frame_consumer_bridge.cc",
    "frame_consumer_bridge.h",
    "host_proxy.h",
    "host_proxy.mm",
  ]

  public_deps = [
    "//remoting/protocol",
    "//third_party/webrtc/base:rtc_base",
    "//third_party/webrtc/modules/desktop_capture:primitives",
  ]

  deps = [
    "//base",
    "//net",
    "//remoting/client/ios:ios_core",
    "//remoting/resources:strings",
    "//ui/base",
    "//ui/gfx",
    "//ui/resources",
    "//ui/strings:ui_strings",
  ]

  libs = [
    "Accelerate.framework",
    "AudioToolbox.framework",
    "CoreAudio.framework",
    "CoreData.framework",
    "CoreMIDI.framework",
    "CoreVideo.framework",
    "CoreGraphics.framework",
    "GLKit.framework",
    "OpenGLES.framework",
    "Webkit.framework",
  ]

  configs += [ "//build/config/compiler:enable_arc" ]
}

source_set("bridge_unit_tests") {
  testonly = true

  include_dirs = [
    "$root_gen_dir",
    "//third_party/protobuf/src",
  ]

  sources = [
    "client_instance_unittest.mm",
    "client_proxy_unittest.mm",

    #    "frame_consumer_bridge_unittest.cc",
    "host_proxy_unittest.mm",
  ]

  deps = [
    ":bridge",
    "//testing/gtest",
  ]

  configs += [ "//build/config/compiler:enable_arc" ]

  data = []
}
