# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS.  All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.

import("../webrtc.gni")

if (is_android) {
  import("//build/config/android/config.gni")
  import("//build/config/android/rules.gni")
  import("//third_party/jni_zero/jni_zero.gni")
} else if (is_mac) {
  import("//build/config/mac/rules.gni")
} else if (is_ios) {
  import("//build/config/ios/rules.gni")
} else if (is_linux || is_chromeos) {
  import("//build/config/linux/pkg_config.gni")
}

group("examples") {
  # This target shall build all targets in examples.
  testonly = true
  deps = []

  if (is_android) {
    deps += [
      ":AppRTCMobile",
      ":AppRTCMobile_test_apk",

      #TODO(https://bugs.webrtc.org/15095) - Fix or remove this target.
      #":libwebrtc_unity",
      "androidvoip",
    ]

    # TODO(sakal): We include some code from the tests. Remove this dependency
    # and remove this if-clause.
    if (rtc_include_tests) {
      deps += [ "androidnativeapi" ]
    }
  }

  if (!build_with_chromium) {
    deps += [ ":stun_prober" ]
  }

  if (is_ios || (is_mac && target_cpu != "x86")) {
    deps += [ ":AppRTCMobile" ]
  }

  if (is_linux || is_chromeos || is_win) {
    deps += [
      ":peerconnection_server",
      ":stunserver",
      ":turnserver",
    ]
    if (current_os != "winuwp") {
      deps += [ ":peerconnection_client" ]
    }
  }

  if (is_android || is_win) {
    deps += [ ":webrtc_unity_plugin" ]
  }
}

rtc_library("read_auth_file") {
  testonly = true
  sources = [
    "turnserver/read_auth_file.cc",
    "turnserver/read_auth_file.h",
  ]
  deps = [
    "../api:array_view",
    "../rtc_base:stringutils",
  ]
  absl_deps = [ "//third_party/abseil-cpp/absl/strings:strings" ]
}

if (rtc_include_tests) {
  rtc_test("examples_unittests") {
    testonly = true
    sources = [ "turnserver/read_auth_file_unittest.cc" ]
    deps = [
      ":read_auth_file",
      "../test:test_main",
      "//test:test_support",
      "//testing/gtest",
    ]
  }
}

if (is_android) {
  rtc_android_apk("AppRTCMobile") {
    testonly = true
    apk_name = "AppRTCMobile"
    android_manifest = "androidapp/AndroidManifest.xml"
    min_sdk_version = 21
    target_sdk_version = 31

    deps = [
      ":AppRTCMobile_javalib",
      ":AppRTCMobile_resources",
      "../rtc_base:base_java",
    ]

    shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
  }

  rtc_android_library("AppRTCMobile_javalib") {
    testonly = true
    android_manifest = "androidapp/AndroidManifest.xml"

    sources = [
      "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
      "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
      "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
      "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
      "androidapp/src/org/appspot/apprtc/CallActivity.java",
      "androidapp/src/org/appspot/apprtc/CallFragment.java",
      "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
      "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
      "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
      "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
      "androidapp/src/org/appspot/apprtc/HudFragment.java",
      "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
      "androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.java",
      "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
      "androidapp/src/org/appspot/apprtc/RtcEventLog.java",
      "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
      "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
      "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
      "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
      "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
      "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
      "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
      "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
    ]

    resources_package = "org.appspot.apprtc"
    deps = [
      ":AppRTCMobile_resources",
      "../rtc_base:base_java",
      "../sdk/android:audio_api_java",
      "../sdk/android:base_java",
      "../sdk/android:camera_java",
      "../sdk/android:default_video_codec_factory_java",
      "../sdk/android:filevideo_java",
      "../sdk/android:hwcodecs_java",
      "../sdk/android:java_audio_device_module_java",
      "../sdk/android:libjingle_peerconnection_java",
      "../sdk/android:libjingle_peerconnection_metrics_default_java",
      "../sdk/android:peerconnection_java",
      "../sdk/android:screencapturer_java",
      "../sdk/android:surfaceviewrenderer_java",
      "../sdk/android:swcodecs_java",
      "../sdk/android:video_api_java",
      "../sdk/android:video_java",
      "androidapp/third_party/autobanh:autobanh_java",
      "//third_party/androidx:androidx_annotation_annotation_java",
    ]
  }

  android_resources("AppRTCMobile_resources") {
    testonly = true
    sources = [
      "androidapp/res/drawable-hdpi/disconnect.png",
      "androidapp/res/drawable-hdpi/ic_action_full_screen.png",
      "androidapp/res/drawable-hdpi/ic_action_return_from_full_screen.png",
      "androidapp/res/drawable-hdpi/ic_launcher.png",
      "androidapp/res/drawable-hdpi/ic_loopback_call.png",
      "androidapp/res/drawable-ldpi/disconnect.png",
      "androidapp/res/drawable-ldpi/ic_action_full_screen.png",
      "androidapp/res/drawable-ldpi/ic_action_return_from_full_screen.png",
      "androidapp/res/drawable-ldpi/ic_launcher.png",
      "androidapp/res/drawable-ldpi/ic_loopback_call.png",
      "androidapp/res/drawable-mdpi/disconnect.png",
      "androidapp/res/drawable-mdpi/ic_action_full_screen.png",
      "androidapp/res/drawable-mdpi/ic_action_return_from_full_screen.png",
      "androidapp/res/drawable-mdpi/ic_launcher.png",
      "androidapp/res/drawable-mdpi/ic_loopback_call.png",
      "androidapp/res/drawable-xhdpi/disconnect.png",
      "androidapp/res/drawable-xhdpi/ic_action_full_screen.png",
      "androidapp/res/drawable-xhdpi/ic_action_return_from_full_screen.png",
      "androidapp/res/drawable-xhdpi/ic_launcher.png",
      "androidapp/res/drawable-xhdpi/ic_loopback_call.png",
      "androidapp/res/layout/activity_call.xml",
      "androidapp/res/layout/activity_connect.xml",
      "androidapp/res/layout/fragment_call.xml",
      "androidapp/res/layout/fragment_hud.xml",
      "androidapp/res/menu/connect_menu.xml",
      "androidapp/res/values-v17/styles.xml",
      "androidapp/res/values-v21/styles.xml",
      "androidapp/res/values/arrays.xml",
      "androidapp/res/values/strings.xml",
      "androidapp/res/xml/preferences.xml",
    ]

    # Needed for Bazel converter.
    custom_package = "org.appspot.apprtc"
    resource_dirs = [ "androidapp/res" ]
    assert(resource_dirs != [])  # Mark as used.
  }

  rtc_instrumentation_test_apk("AppRTCMobile_test_apk") {
    apk_name = "AppRTCMobileTest"
    android_manifest = "androidtests/AndroidManifest.xml"
    min_sdk_version = 21
    target_sdk_version = 31

    sources = [
      "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
    ]

    apk_under_test = ":AppRTCMobile"

    deps = [
      ":AppRTCMobile_javalib",
      "../sdk/android:base_java",
      "../sdk/android:camera_java",
      "../sdk/android:libjingle_peerconnection_java",
      "../sdk/android:peerconnection_java",
      "../sdk/android:video_api_java",
      "../sdk/android:video_java",
      "//third_party/androidx:androidx_test_monitor_java",
      "//third_party/androidx:androidx_test_runner_java",
      "//third_party/junit",
    ]
  }
}

if (is_ios || (is_mac && target_cpu != "x86")) {
  config("apprtc_common_config") {
    include_dirs = [ "objc/AppRTCMobile/common" ]
  }

  rtc_library("apprtc_common") {
    testonly = true
    sources = [
      "objc/AppRTCMobile/common/ARDUtilities.h",
      "objc/AppRTCMobile/common/ARDUtilities.m",
    ]
    public_configs = [ ":apprtc_common_config" ]
    deps = [ "../sdk:base_objc" ]
  }

  config("apprtc_signaling_config") {
    include_dirs = [ "objc/AppRTCMobile" ]
  }

  rtc_library("apprtc_signaling") {
    testonly = true
    sources = [
      "objc/AppRTCMobile/ARDAppClient+Internal.h",
      "objc/AppRTCMobile/ARDAppClient.h",
      "objc/AppRTCMobile/ARDAppClient.m",
      "objc/AppRTCMobile/ARDAppEngineClient.h",
      "objc/AppRTCMobile/ARDAppEngineClient.m",
      "objc/AppRTCMobile/ARDCaptureController.h",
      "objc/AppRTCMobile/ARDCaptureController.m",
      "objc/AppRTCMobile/ARDExternalSampleCapturer.h",
      "objc/AppRTCMobile/ARDExternalSampleCapturer.m",
      "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
      "objc/AppRTCMobile/ARDJoinResponse.h",
      "objc/AppRTCMobile/ARDJoinResponse.m",
      "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
      "objc/AppRTCMobile/ARDMessageResponse.h",
      "objc/AppRTCMobile/ARDMessageResponse.m",
      "objc/AppRTCMobile/ARDRoomServerClient.h",
      "objc/AppRTCMobile/ARDSettingsModel+Private.h",
      "objc/AppRTCMobile/ARDSettingsModel.h",
      "objc/AppRTCMobile/ARDSettingsModel.m",
      "objc/AppRTCMobile/ARDSettingsStore.h",
      "objc/AppRTCMobile/ARDSettingsStore.m",
      "objc/AppRTCMobile/ARDSignalingChannel.h",
      "objc/AppRTCMobile/ARDSignalingMessage.h",
      "objc/AppRTCMobile/ARDSignalingMessage.m",
      "objc/AppRTCMobile/ARDStatsBuilder.h",
      "objc/AppRTCMobile/ARDStatsBuilder.m",
      "objc/AppRTCMobile/ARDTURNClient+Internal.h",
      "objc/AppRTCMobile/ARDTURNClient.h",
      "objc/AppRTCMobile/ARDTURNClient.m",
      "objc/AppRTCMobile/ARDWebSocketChannel.h",
      "objc/AppRTCMobile/ARDWebSocketChannel.m",
      "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
      "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
      "objc/AppRTCMobile/RTCIceServer+JSON.h",
      "objc/AppRTCMobile/RTCIceServer+JSON.m",
      "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
      "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
    ]
    public_configs = [ ":apprtc_signaling_config" ]
    deps = [
      ":apprtc_common",
      ":socketrocket",
      "../sdk:base_objc",
      "../sdk:default_codec_factory_objc",
      "../sdk:file_logger_objc",
      "../sdk:helpers_objc",
      "../sdk:mediaconstraints_objc",
      "../sdk:peerconnectionfactory_base_objc",
      "../sdk:videocapture_objc",
      "../sdk:videoframebuffer_objc",
      "../sdk:videosource_objc",
    ]
    frameworks = [
      "CoreMedia.framework",
      "QuartzCore.framework",
    ]
  }

  if (is_ios) {
    rtc_library("AppRTCMobile_lib") {
      # iOS must use WebRTC.framework which is dynamically linked.
      testonly = true
      sources = [
        "objc/AppRTCMobile/ios/ARDAppDelegate.h",
        "objc/AppRTCMobile/ios/ARDAppDelegate.m",
        "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
        "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
        "objc/AppRTCMobile/ios/ARDMainView.h",
        "objc/AppRTCMobile/ios/ARDMainView.m",
        "objc/AppRTCMobile/ios/ARDMainViewController.h",
        "objc/AppRTCMobile/ios/ARDMainViewController.m",
        "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
        "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
        "objc/AppRTCMobile/ios/ARDStatsView.h",
        "objc/AppRTCMobile/ios/ARDStatsView.m",
        "objc/AppRTCMobile/ios/ARDVideoCallView.h",
        "objc/AppRTCMobile/ios/ARDVideoCallView.m",
        "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
        "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
        "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
        "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
        "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
        "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
      ]

      configs += [ "..:common_objc" ]

      deps = [
        ":apprtc_common",
        ":apprtc_signaling",
        "../sdk:audio_session_objc",
        "../sdk:base_objc",
        "../sdk:helpers_objc",
        "../sdk:mediaconstraints_objc",
        "../sdk:metal_objc",
        "../sdk:peerconnectionfactory_base_objc",
        "../sdk:peerconnectionfactory_base_objc",
        "../sdk:videocapture_objc",
        "../sdk:videocodec_objc",
      ]
      if (rtc_ios_use_opengl_rendering) {
        deps += [ "../sdk:opengl_ui_objc" ]
      }

      frameworks = [ "AVFoundation.framework" ]
    }

    ios_app_bundle("AppRTCMobile") {
      testonly = true
      sources = [ "objc/AppRTCMobile/ios/main.m" ]

      info_plist = "objc/AppRTCMobile/ios/Info.plist"

      configs += [ "..:common_config" ]
      public_configs = [ "..:common_inherited_config" ]

      deps = [
        ":AppRTCMobile_ios_bundle_data",
        ":AppRTCMobile_lib",
        "../sdk:framework_objc",
        "../sdk:ios_framework_bundle",
      ]

      if (rtc_apprtcmobile_broadcast_extension) {
        deps += [
          ":AppRTCMobileBroadcastSetupUI_extension_bundle",
          ":AppRTCMobileBroadcastUpload_extension_bundle",
        ]
      }

      if (target_cpu == "x86") {
        deps += [ "//testing/iossim" ]
      }
    }

    if (rtc_apprtcmobile_broadcast_extension) {
      bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") {
        testonly = true
        public_deps = [  # no-presubmit-check TODO(webrtc:8603)
          ":AppRTCMobileBroadcastUpload",  # prevent code format
        ]
        sources = [ "$root_out_dir/AppRTCMobileBroadcastUpload.appex" ]
        outputs = [ "{{bundle_contents_dir}}/Plugins/{{source_file_part}}" ]
      }

      bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") {
        testonly = true
        public_deps = [  # no-presubmit-check TODO(webrtc:8603)
          ":AppRTCMobileBroadcastSetupUI",  # prevent code format
        ]
        sources = [ "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex" ]
        outputs = [ "{{bundle_contents_dir}}/Plugins/{{source_file_part}}" ]
      }

      rtc_library("AppRTCMobileBroadcastUpload_lib") {
        testonly = true
        sources = [
          "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h",
          "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m",
        ]

        deps = [
          ":apprtc_signaling",
          "../sdk:framework_objc+link",
          "../sdk:ios_framework_bundle",
        ]

        frameworks = [ "ReplayKit.framework" ]
      }

      ios_appex_bundle("AppRTCMobileBroadcastUpload") {
        testonly = true
        configs += [ "..:common_config" ]
        public_configs = [ "..:common_inherited_config" ]

        info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist"

        deps = [
          ":AppRTCMobileBroadcastUpload_lib",
          "../sdk:framework_objc",
        ]
      }

      ios_appex_bundle("AppRTCMobileBroadcastSetupUI") {
        sources = [
          "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h",
          "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m",
        ]

        info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist"

        frameworks = [ "ReplayKit.framework" ]

        deps = [ ":AppRTCMobile_ios_bundle_data" ]
      }
    }

    bundle_data("AppRTCMobile_ios_bundle_data") {
      sources = [
        "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",

        # Sample video taken from https://media.xiph.org/video/derf/
        "objc/AppRTCMobile/ios/resources/foreman.mp4",
        "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
        "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
        "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
        "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
        "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
        "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
        "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
        "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
        "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
        "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
        "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
        "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
        "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
        "objc/AppRTCMobile/ios/resources/mozart.mp3",
        "objc/Icon-120.png",
        "objc/Icon-180.png",
        "objc/Icon.png",
      ]
      outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
    }

    rtc_library("ObjCNativeAPIDemo_lib") {
      testonly = true
      sources = [
        "objcnativeapi/objc/NADAppDelegate.h",
        "objcnativeapi/objc/NADAppDelegate.m",
        "objcnativeapi/objc/NADViewController.h",
        "objcnativeapi/objc/NADViewController.mm",
        "objcnativeapi/objc/objc_call_client.h",
        "objcnativeapi/objc/objc_call_client.mm",
      ]

      deps = [
        "../api:libjingle_peerconnection_api",
        "../api:scoped_refptr",
        "../api:sequence_checker",
        "../api/audio_codecs:builtin_audio_decoder_factory",
        "../api/audio_codecs:builtin_audio_encoder_factory",
        "../api/rtc_event_log:rtc_event_log_factory",
        "../api/task_queue:default_task_queue_factory",
        "../media:rtc_audio_video",
        "../modules/audio_processing",
        "../modules/audio_processing:api",
        "../pc:libjingle_peerconnection",
        "../rtc_base/synchronization:mutex",
        "../sdk:base_objc",
        "../sdk:default_codec_factory_objc",
        "../sdk:helpers_objc",
        "../sdk:metal_objc",
        "../sdk:native_api",
        "../sdk:videocapture_objc",
        "../sdk:videotoolbox_objc",
      ]

      if (rtc_ios_use_opengl_rendering) {
        deps += [ "../sdk:opengl_ui_objc" ]
      }
    }

    ios_app_bundle("ObjCNativeAPIDemo") {
      testonly = true
      sources = [ "objcnativeapi/objc/main.m" ]

      info_plist = "objcnativeapi/Info.plist"

      configs += [ "..:common_config" ]
      public_configs = [ "..:common_inherited_config" ]

      deps = [ ":ObjCNativeAPIDemo_lib" ]

      if (target_cpu == "x86") {
        deps += [ "//testing/iossim" ]
      }
    }
  }

  if (is_mac) {
    rtc_library("AppRTCMobile_lib") {
      testonly = true
      sources = [
        "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
        "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
        "objc/AppRTCMobile/mac/APPRTCViewController.h",
        "objc/AppRTCMobile/mac/APPRTCViewController.m",
      ]
      configs += [ "..:common_objc" ]
      deps = [
        ":apprtc_common",
        ":apprtc_signaling",
        "../sdk:base_objc",
        "../sdk:helpers_objc",
        "../sdk:mediaconstraints_objc",
        "../sdk:metal_objc",
        "../sdk:peerconnectionfactory_base_objc",
        "../sdk:peerconnectionfactory_base_objc",
        "../sdk:videocapture_objc",
        "../sdk:videocodec_objc",
      ]
    }

    mac_app_bundle("AppRTCMobile") {
      testonly = true
      output_name = "AppRTCMobile"

      sources = [ "objc/AppRTCMobile/mac/main.m" ]

      public_configs = [ "..:common_inherited_config" ]

      info_plist = "objc/AppRTCMobile/mac/Info.plist"

      frameworks = [ "AppKit.framework" ]

      ldflags = [
        "-rpath",
        "@executable_path/../Frameworks",
      ]

      deps = [
        ":AppRTCMobile_lib",
        "../sdk:mac_framework_bundle",
        "../sdk:mac_framework_objc+link",
      ]
    }
  }

  config("socketrocket_include_config") {
    include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
  }

  config("socketrocket_warning_config") {
    # GN orders flags on a target before flags from configs. The default config
    # adds these flags so to cancel them out they need to come from a config and
    # cannot be on the target directly.
    cflags = [
      "-Wno-deprecated-declarations",
      "-Wno-nonnull",
      "-Wno-semicolon-before-method-body",
      "-Wno-unused-variable",
    ]

    cflags_objc = [
      # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
      "-Wno-objc-missing-property-synthesis",
    ]
  }

  rtc_library("socketrocket") {
    testonly = true
    sources = [
      "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
      "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
    ]
    configs += [ ":socketrocket_warning_config" ]
    public_configs = [ ":socketrocket_include_config" ]

    libs = [ "icucore" ]
    frameworks = [
      "CFNetwork.framework",
      "Security.framework",
    ]
  }

  if (rtc_include_tests) {
    # TODO(kthelgason): compile xctests on mac when chromium supports it.
    if (is_ios) {
      rtc_library("apprtcmobile_test_sources") {
        # iOS must use WebRTC.framework which is dynamically linked.
        testonly = true
        include_dirs = [
          "objc/AppRTCMobile",
          "objc/AppRTCMobile/ios",
        ]
        sources = [
          "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
          "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
          "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
        ]
        deps = [
          ":AppRTCMobile_lib",
          ":apprtc_signaling",
          "../rtc_base:ssl",
          "../sdk:mediaconstraints_objc",
          "../sdk:peerconnectionfactory_base_objc",
          "../sdk:videocapture_objc",
          "//build/config/ios:xctest",
          "//third_party/ocmock",
        ]
      }

      rtc_test("apprtcmobile_tests") {
        is_xctest = true
        info_plist = "objc/AppRTCMobile/ios/Info.plist"
        sources = [ "objc/AppRTCMobile/tests/main.mm" ]
        deps = [
          ":AppRTCMobile_lib",
          ":apprtcmobile_test_sources",
          "../sdk:framework_objc",
          "//test:test_support",
        ]
        ldflags = [ "-all_load" ]
      }
    }
  }
}

if (is_linux || is_chromeos || is_win) {
  if (is_linux || is_chromeos) {
    pkg_config("gtk_config") {
      packages = [
        # Gtk requires gmodule, but it does not list it as a dependency in some
        # misconfigured systems.
        "gmodule-2.0",
        "gthread-2.0",
        "gtk+-3.0",
      ]
    }
  }

  rtc_executable("peerconnection_client") {
    testonly = true
    sources = [
      "peerconnection/client/conductor.cc",
      "peerconnection/client/conductor.h",
      "peerconnection/client/defaults.cc",
      "peerconnection/client/defaults.h",
      "peerconnection/client/peer_connection_client.cc",
      "peerconnection/client/peer_connection_client.h",
    ]

    deps = [
      "../api:async_dns_resolver",
      "../api:audio_options_api",
      "../api:create_peerconnection_factory",
      "../api:libjingle_peerconnection_api",
      "../api:media_stream_interface",
      "../api:rtp_sender_interface",
      "../api:scoped_refptr",
      "../api/audio:audio_mixer_api",
      "../api/audio_codecs:audio_codecs_api",
      "../api/task_queue:pending_task_safety_flag",
      "../api/units:time_delta",
      "../api/video:video_frame",
      "../api/video:video_rtp_headers",
      "../api/video_codecs:video_codecs_api",
      "../media:media_channel",
      "../media:rtc_media_base",
      "../p2p:rtc_p2p",
      "../pc:video_track_source",
      "../rtc_base:async_dns_resolver",
      "../rtc_base:checks",
      "../rtc_base:logging",
      "../rtc_base:macromagic",
      "../rtc_base:net_helpers",
      "../rtc_base:refcount",
      "../rtc_base:rtc_certificate_generator",
      "../rtc_base:ssl",
      "../rtc_base:stringutils",
      "../rtc_base:threading",
      "../rtc_base/third_party/sigslot",
      "../system_wrappers:field_trial",
      "../test:field_trial",
      "../test:platform_video_capturer",
      "../test:rtp_test_utils",
      "//third_party/abseil-cpp/absl/memory",
      "//third_party/abseil-cpp/absl/types:optional",
    ]
    if (is_win) {
      sources += [
        "peerconnection/client/flag_defs.h",
        "peerconnection/client/main.cc",
        "peerconnection/client/main_wnd.cc",
        "peerconnection/client/main_wnd.h",
      ]
      configs += [ "//build/config/win:windowed" ]
      deps += [
        "../media:rtc_media_base",
        "../rtc_base:win32",
        "../rtc_base:win32_socket_init",
      ]
    }
    if (is_linux || is_chromeos) {
      sources += [
        "peerconnection/client/linux/main.cc",
        "peerconnection/client/linux/main_wnd.cc",
        "peerconnection/client/linux/main_wnd.h",
      ]
      cflags = [ "-Wno-deprecated-declarations" ]
      libs = [
        "X11",
        "Xcomposite",
        "Xext",
        "Xrender",
      ]
      configs += [ ":gtk_config" ]
    }

    deps += [
      "../api:libjingle_peerconnection_api",
      "../api/audio_codecs:builtin_audio_decoder_factory",
      "../api/audio_codecs:builtin_audio_encoder_factory",
      "../api/video:video_frame",
      "../api/video:video_rtp_headers",
      "../api/video_codecs:video_decoder_factory_template",
      "../api/video_codecs:video_decoder_factory_template_dav1d_adapter",
      "../api/video_codecs:video_decoder_factory_template_libvpx_vp8_adapter",
      "../api/video_codecs:video_decoder_factory_template_libvpx_vp9_adapter",
      "../api/video_codecs:video_decoder_factory_template_open_h264_adapter",
      "../api/video_codecs:video_encoder_factory_template",
      "../api/video_codecs:video_encoder_factory_template_libaom_av1_adapter",
      "../api/video_codecs:video_encoder_factory_template_libvpx_vp8_adapter",
      "../api/video_codecs:video_encoder_factory_template_libvpx_vp9_adapter",
      "../api/video_codecs:video_encoder_factory_template_open_h264_adapter",
      "../media:rtc_audio_video",
      "../modules/audio_device",
      "../modules/audio_processing",
      "../modules/audio_processing:api",
      "../modules/video_capture:video_capture_module",
      "../pc:libjingle_peerconnection",
      "../rtc_base:rtc_json",
      "../test:video_test_common",
      "//third_party/abseil-cpp/absl/flags:flag",
      "//third_party/abseil-cpp/absl/flags:parse",
      "//third_party/libyuv",
    ]
  }

  rtc_executable("peerconnection_server") {
    testonly = true
    sources = [
      "peerconnection/server/data_socket.cc",
      "peerconnection/server/data_socket.h",
      "peerconnection/server/main.cc",
      "peerconnection/server/peer_channel.cc",
      "peerconnection/server/peer_channel.h",
      "peerconnection/server/utils.cc",
      "peerconnection/server/utils.h",
    ]
    deps = [
      "../rtc_base:checks",
      "../rtc_base:stringutils",
      "../system_wrappers:field_trial",
      "../test:field_trial",
      "//third_party/abseil-cpp/absl/flags:flag",
      "//third_party/abseil-cpp/absl/flags:parse",
      "//third_party/abseil-cpp/absl/flags:usage",
    ]
  }
  rtc_executable("turnserver") {
    testonly = true
    sources = [ "turnserver/turnserver_main.cc" ]
    deps = [
      ":read_auth_file",
      "../p2p:p2p_server_utils",
      "../p2p:rtc_p2p",
      "../pc:rtc_pc",
      "../rtc_base:async_udp_socket",
      "../rtc_base:ip_address",
      "../rtc_base:socket_address",
      "../rtc_base:socket_server",
      "../rtc_base:threading",
      "//third_party/abseil-cpp/absl/strings:strings",
    ]
  }
  rtc_executable("stunserver") {
    testonly = true
    sources = [ "stunserver/stunserver_main.cc" ]
    deps = [
      "../p2p:p2p_server_utils",
      "../p2p:rtc_p2p",
      "../pc:rtc_pc",
      "../rtc_base:async_udp_socket",
      "../rtc_base:socket_address",
      "../rtc_base:socket_server",
      "../rtc_base:threading",
    ]
  }
}

if (is_win || is_android) {
  rtc_shared_library("webrtc_unity_plugin") {
    testonly = true
    sources = [
      "unityplugin/simple_peer_connection.cc",
      "unityplugin/simple_peer_connection.h",
      "unityplugin/unity_plugin_apis.cc",
      "unityplugin/unity_plugin_apis.h",
      "unityplugin/video_observer.cc",
      "unityplugin/video_observer.h",
    ]

    if (is_android) {
      sources += [
        "unityplugin/class_reference_holder.cc",
        "unityplugin/class_reference_holder.h",
        "unityplugin/jni_onload.cc",
      ]
      suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
    }

    if (is_win) {
      configs += [ "//build/config/win:windowed" ]
    }
    deps = [
      "../api:create_peerconnection_factory",
      "../api:libjingle_peerconnection_api",
      "../api:media_stream_interface",
      "../api/audio_codecs:builtin_audio_decoder_factory",
      "../api/audio_codecs:builtin_audio_encoder_factory",
      "../api/video:video_frame",
      "../api/video:video_rtp_headers",
      "../media:rtc_audio_video",
      "../media:rtc_internal_video_codecs",
      "../media:rtc_media",
      "../media:rtc_media_base",
      "../modules/audio_device",
      "../modules/audio_processing",
      "../modules/audio_processing:api",
      "../modules/video_capture:video_capture_module",
      "../pc:libjingle_peerconnection",
      "../pc:video_track_source",
      "../rtc_base:ssl",
      "../test:platform_video_capturer",
      "../test:video_test_common",
      "//third_party/abseil-cpp/absl/memory",
    ]
    if (is_android) {
      deps += [
        "../modules/utility",
        "../sdk/android:libjingle_peerconnection_jni",
        "../sdk/android:native_api_jni",
      ]
    }
  }
}

if (is_android) {
  rtc_android_library("webrtc_unity_java") {
    sources = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
    deps = [
      "../rtc_base:base_java",
      "../sdk/android:camera_java",
      "../sdk/android:libjingle_peerconnection_java",
      "../sdk/android:peerconnection_java",
      "../sdk/android:video_api_java",
      "../sdk/android:video_java",
      "//third_party/androidx:androidx_annotation_annotation_java",
    ]
  }

  # TODO(https://bugs.webrtc.org/15095) - Fix or remove this target.
  #dist_jar("libwebrtc_unity") {
  #  _target_dir_name = get_label_info(":$target_name", "dir")
  #  output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
  #  direct_deps_only = false
  #  use_interface_jars = false
  #  use_unprocessed_jars = false
  #  requires_android = true
  #  deps = [
  #    ":webrtc_unity_java",
  #    "../rtc_base:base_java",
  #    "../sdk/android:libjingle_peerconnection_java",
  #    "../sdk/android:libjingle_peerconnection_metrics_default_java",
  #    "//third_party/androidx:androidx_annotation_annotation_java",
  #  ]
  #}

  robolectric_binary("android_examples_junit_tests") {
    sources = [
      "androidjunit/src/org/appspot/apprtc/BluetoothManagerTest.java",
      "androidjunit/src/org/appspot/apprtc/DirectRTCClientTest.java",
      "androidjunit/src/org/appspot/apprtc/TCPChannelClientTest.java",
    ]

    deps = [
      ":AppRTCMobile_javalib",
      "../sdk/android:peerconnection_java",
      "//third_party/androidx:androidx_test_core_java",
      "//third_party/google-truth:google_truth_java",
    ]

    additional_jar_files = [ [
          "../sdk/android/tests/resources/robolectric.properties",
          "robolectric.properties",
        ] ]
  }
}

if (!build_with_chromium) {
  # Doesn't build within Chrome on Win.
  rtc_executable("stun_prober") {
    testonly = true
    sources = [ "stunprober/main.cc" ]
    deps = [
      "../p2p:libstunprober",
      "../p2p:rtc_p2p",
      "../rtc_base:checks",
      "../rtc_base:logging",
      "../rtc_base:network",
      "../rtc_base:socket_address",
      "../rtc_base:ssl",
      "../rtc_base:threading",
      "../rtc_base:timeutils",
      "../test:scoped_key_value_config",
      "//third_party/abseil-cpp/absl/flags:flag",
      "//third_party/abseil-cpp/absl/flags:parse",
    ]
  }
}
