| # 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") |
| } else if (is_mac) { |
| import("//build/config/mac/rules.gni") |
| } else if (is_ios) { |
| import("//build/config/ios/rules.gni") |
| } |
| |
| group("examples") { |
| # This target shall build all targets in examples. |
| testonly = true |
| deps = [] |
| |
| if (is_android) { |
| deps += [ |
| ":AppRTCMobile", |
| ":AppRTCMobile_stubbed_video_io_test_apk", |
| ":AppRTCMobile_test_apk", |
| ":libwebrtc_unity", |
| ] |
| |
| # TODO(sakal): We include some code from the tests. Remove this dependency |
| # and remove this if-clause. |
| if (rtc_include_tests) { |
| deps += [ "androidnativeapi:androidnativeapi" ] |
| } |
| } |
| |
| if (!build_with_chromium) { |
| deps += [ ":stun_prober" ] |
| } |
| |
| if (is_ios || (is_mac && target_cpu != "x86")) { |
| deps += [ ":AppRTCMobile" ] |
| } |
| |
| if (is_linux || is_win) { |
| deps += [ |
| ":peerconnection_server", |
| ":relayserver", |
| ":stunserver", |
| ":turnserver", |
| ] |
| if (current_os != "winuwp") { |
| deps += [ ":peerconnection_client" ] |
| } |
| } |
| |
| if (is_android || is_win) { |
| deps += [ ":webrtc_unity_plugin" ] |
| } |
| } |
| |
| rtc_source_set("read_auth_file") { |
| testonly = true |
| sources = [ |
| "turnserver/read_auth_file.cc", |
| "turnserver/read_auth_file.h", |
| ] |
| deps = [ |
| "../rtc_base:rtc_base", |
| ] |
| } |
| |
| 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" |
| |
| 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_for_lint = "androidapp/AndroidManifest.xml" |
| |
| java_files = [ |
| "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/RoomParametersFetcher.java", |
| "androidapp/src/org/appspot/apprtc/RtcEventLog.java", |
| "androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.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", |
| ] |
| |
| deps = [ |
| ":AppRTCMobile_resources", |
| "../modules/audio_device:audio_device_java", |
| "../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/android_deps:android_support_annotations_java", |
| ] |
| } |
| |
| android_resources("AppRTCMobile_resources") { |
| testonly = true |
| resource_dirs = [ "androidapp/res" ] |
| custom_package = "org.appspot.apprtc" |
| } |
| |
| rtc_instrumentation_test_apk("AppRTCMobile_test_apk") { |
| apk_name = "AppRTCMobileTest" |
| android_manifest = "androidtests/AndroidManifest.xml" |
| |
| java_files = [ |
| "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java", |
| ] |
| |
| apk_under_test = ":AppRTCMobile" |
| |
| deps = [ |
| ":AppRTCMobile_javalib", |
| "../sdk/android:libjingle_peerconnection_java", |
| "../sdk/android:video_java", |
| "//third_party/android_support_test_runner:runner_java", |
| "//third_party/junit", |
| ] |
| } |
| |
| group("video_quality_loopback_test") { |
| testonly = true |
| |
| deps = [ |
| ":AppRTCMobile_stubbed_video_io_test_apk", |
| "../rtc_tools:frame_analyzer_host", |
| ] |
| |
| data = [ |
| "../build/android/adb_reverse_forwarder.py", |
| "../examples/androidtests/video_quality_loopback_test.py", |
| "../resources/reference_video_640x360_30fps.y4m", |
| "../rtc_tools/compare_videos.py", |
| "../rtc_tools/testing/prebuilt_apprtc.zip", |
| "../rtc_tools/testing/golang/linux/go.tar.gz", |
| "../rtc_tools/testing/build_apprtc.py", |
| "../rtc_tools/testing/utils.py", |
| "../tools_webrtc/video_quality_toolchain/linux/ffmpeg", |
| "${root_out_dir}/frame_analyzer_host", |
| ] |
| } |
| |
| rtc_instrumentation_test_apk("AppRTCMobile_stubbed_video_io_test_apk") { |
| apk_name = "AppRTCMobileTestStubbedVideoIO" |
| android_manifest = "androidtests/AndroidManifest.xml" |
| |
| java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ] |
| |
| apk_under_test = ":AppRTCMobile" |
| |
| deps = [ |
| ":AppRTCMobile_javalib", |
| "../sdk/android:libjingle_peerconnection_java", |
| "//third_party/android_support_test_runner:rules_java", |
| "//third_party/android_support_test_runner:runner_java", |
| "//third_party/espresso:espresso_all_java", |
| "//third_party/hamcrest:hamcrest_java", |
| "//third_party/junit", |
| ] |
| |
| data = [ |
| "../resources/reference_video_640x360_30fps.y4m", |
| ] |
| } |
| } |
| |
| if (is_ios || (is_mac && target_cpu != "x86")) { |
| config("apprtc_common_config") { |
| include_dirs = [ "objc/AppRTCMobile/common" ] |
| } |
| |
| rtc_static_library("apprtc_common") { |
| testonly = true |
| sources = [ |
| "objc/AppRTCMobile/common/ARDUtilities.h", |
| "objc/AppRTCMobile/common/ARDUtilities.m", |
| ] |
| public_configs = [ ":apprtc_common_config" ] |
| |
| if (is_ios) { |
| # iOS must use WebRTC.framework which is dynamically linked. |
| deps = [ |
| "../sdk:framework_objc+link", |
| ] |
| } else { |
| deps = [ |
| "../sdk:mac_framework_objc+link", |
| ] |
| } |
| } |
| |
| config("apprtc_signaling_config") { |
| include_dirs = [ "objc/AppRTCMobile" ] |
| } |
| |
| rtc_static_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/ARDBitrateTracker.h", |
| "objc/AppRTCMobile/ARDBitrateTracker.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/RTCMediaConstraints+JSON.h", |
| "objc/AppRTCMobile/RTCMediaConstraints+JSON.m", |
| "objc/AppRTCMobile/RTCSessionDescription+JSON.h", |
| "objc/AppRTCMobile/RTCSessionDescription+JSON.m", |
| ] |
| public_configs = [ ":apprtc_signaling_config" ] |
| deps = [ |
| ":apprtc_common", |
| ":socketrocket", |
| ] |
| if (is_ios) { |
| # iOS must use WebRTC.framework which is dynamically linked. |
| deps += [ |
| "../sdk:framework_objc+link", |
| "../sdk:ios_framework_bundle", |
| ] |
| } else { |
| deps += [ "../sdk:mac_framework_objc+link" ] |
| } |
| libs = [ "QuartzCore.framework" ] |
| } |
| |
| if (is_ios) { |
| rtc_static_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", |
| ] |
| |
| deps = [ |
| ":apprtc_common", |
| ":apprtc_signaling", |
| "../sdk:framework_objc+link", |
| "../sdk:ios_framework_bundle", |
| ] |
| } |
| |
| 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:iossim" ] |
| } |
| } |
| |
| if (rtc_apprtcmobile_broadcast_extension) { |
| bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") { |
| testonly = true |
| public_deps = [ |
| ":AppRTCMobileBroadcastUpload", |
| ] |
| sources = [ |
| "$root_out_dir/AppRTCMobileBroadcastUpload.appex", |
| ] |
| outputs = [ |
| "{{bundle_plugins_dir}}/{{source_file_part}}", |
| ] |
| } |
| |
| bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") { |
| testonly = true |
| public_deps = [ |
| ":AppRTCMobileBroadcastSetupUI", |
| ] |
| sources = [ |
| "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex", |
| ] |
| outputs = [ |
| "{{bundle_plugins_dir}}/{{source_file_part}}", |
| ] |
| } |
| |
| rtc_static_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", |
| ] |
| |
| libs = [ "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" |
| |
| libs = [ "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_static_library("ObjCNativeAPIDemo_lib") { |
| testonly = true |
| sources = [ |
| "objcnativeapi/objc/NADAppDelegate.h", |
| "objcnativeapi/objc/NADAppDelegate.m", |
| "objcnativeapi/objc/NADViewController.h", |
| "objcnativeapi/objc/NADViewController.mm", |
| "objcnativeapi/objc/objccallclient.h", |
| "objcnativeapi/objc/objccallclient.mm", |
| ] |
| |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| |
| deps = [ |
| "../api:libjingle_peerconnection_api", |
| "../api/audio_codecs:builtin_audio_decoder_factory", |
| "../api/audio_codecs:builtin_audio_encoder_factory", |
| "../api/video:builtin_video_bitrate_allocator_factory", |
| "../logging:rtc_event_log_impl_base", |
| "../media:rtc_audio_video", |
| "../modules/audio_processing:api", |
| "../modules/audio_processing:audio_processing", |
| "../pc:libjingle_peerconnection", |
| "../rtc_base:rtc_base", |
| "../sdk:base_objc", |
| "../sdk:default_codec_factory_objc", |
| "../sdk:helpers_objc", |
| "../sdk:native_api", |
| "../sdk:ui_objc", |
| "../sdk:videocapture_objc", |
| "../sdk:videotoolbox_objc", |
| "//third_party/abseil-cpp/absl/memory", |
| ] |
| |
| if (current_cpu == "arm64") { |
| deps += [ "../sdk:metal_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:iossim" ] |
| } |
| } |
| } |
| |
| if (is_mac) { |
| rtc_static_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:mac_framework_objc+link", |
| ] |
| } |
| |
| 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" |
| |
| libs = [ "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_static_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 = [ |
| "CFNetwork.framework", |
| "icucore", |
| ] |
| } |
| |
| if (rtc_include_tests) { |
| # TODO(kthelgason): compile xctests on mac when chromium supports it. |
| if (is_ios) { |
| rtc_source_set("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:rtc_base", |
| "../sdk:framework_objc+link", |
| "../sdk:ios_framework_bundle", |
| "//build/config/ios:xctest", |
| "//third_party/ocmock", |
| ] |
| } |
| |
| rtc_ios_xctest_test("apprtcmobile_tests") { |
| 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_win) { |
| 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", |
| ] |
| |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| deps = [ |
| "../api:audio_options_api", |
| "../api:create_peerconnection_factory", |
| "../api:libjingle_peerconnection_api", |
| "../api/audio:audio_mixer_api", |
| "../api/audio_codecs:audio_codecs_api", |
| "../api/video:video_frame_i420", |
| "../api/video_codecs:video_codecs_api", |
| "../media:rtc_media_base", |
| "../p2p:rtc_p2p", |
| "../rtc_base:checks", |
| "../rtc_base/third_party/sigslot", |
| "../system_wrappers:field_trial", |
| "../test:field_trial", |
| "//third_party/abseil-cpp/absl/memory", |
| "//third_party/abseil-cpp/absl/types:optional", |
| ] |
| if (is_win) { |
| sources += [ |
| "peerconnection/client/flagdefs.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" ] |
| } |
| if (is_linux) { |
| 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", |
| ] |
| deps += [ "//build/config/linux/gtk" ] |
| } |
| |
| 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_codecs:builtin_video_decoder_factory", |
| "../api/video_codecs:builtin_video_encoder_factory", |
| "../media:rtc_audio_video", |
| "../modules/audio_device:audio_device", |
| "../modules/audio_processing:api", |
| "../modules/audio_processing:audio_processing", |
| "../modules/video_capture:video_capture_module", |
| "../pc:libjingle_peerconnection", |
| "../pc:peerconnection", |
| "../rtc_base:rtc_base", |
| "../rtc_base:rtc_base_approved", |
| "../rtc_base:rtc_json", |
| "../test:video_test_common", |
| "//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:rtc_base_approved", |
| "../rtc_tools:command_line_parser", |
| "../system_wrappers:field_trial", |
| "../test:field_trial", |
| ] |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| } |
| rtc_executable("relayserver") { |
| testonly = true |
| sources = [ |
| "relayserver/relayserver_main.cc", |
| ] |
| deps = [ |
| "../p2p:p2p_server_utils", |
| "../p2p:rtc_p2p", |
| "../pc:rtc_pc", |
| "../rtc_base:rtc_base", |
| "../rtc_base:rtc_base_approved", |
| ] |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| } |
| 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:rtc_base", |
| "../rtc_base:rtc_base_approved", |
| ] |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| } |
| rtc_executable("stunserver") { |
| testonly = true |
| sources = [ |
| "stunserver/stunserver_main.cc", |
| ] |
| deps = [ |
| "../p2p:p2p_server_utils", |
| "../p2p:rtc_p2p", |
| "../pc:rtc_pc", |
| "../rtc_base:rtc_base", |
| "../rtc_base:rtc_base_approved", |
| ] |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| } |
| } |
| |
| 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/classreferenceholder.cc", |
| "unityplugin/classreferenceholder.h", |
| "unityplugin/jni_onload.cc", |
| ] |
| suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] |
| } |
| |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| if (is_win) { |
| configs += [ "//build/config/win:windowed" ] |
| } |
| deps = [ |
| "../api:create_peerconnection_factory", |
| "../api:libjingle_peerconnection_api", |
| "../api/audio_codecs:builtin_audio_decoder_factory", |
| "../api/audio_codecs:builtin_audio_encoder_factory", |
| "../api/video:video_frame", |
| "../media:rtc_audio_video", |
| "../media:rtc_internal_video_codecs", |
| "../media:rtc_media", |
| "../media:rtc_media_base", |
| "../modules/audio_device:audio_device", |
| "../modules/audio_processing:api", |
| "../modules/audio_processing:audio_processing", |
| "../modules/video_capture:video_capture_module", |
| "../pc:libjingle_peerconnection", |
| "../pc:peerconnection", |
| "../rtc_base:rtc_base", |
| "../test:video_test_common", |
| "//third_party/abseil-cpp/absl/memory", |
| ] |
| if (is_android) { |
| deps += [ |
| "../modules/utility:utility", |
| "../sdk/android:libjingle_peerconnection_jni", |
| ] |
| } |
| } |
| } |
| |
| if (is_android) { |
| rtc_android_library("webrtc_unity_java") { |
| java_files = [ "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_java", |
| "//third_party/android_deps:android_support_annotations_java", |
| ] |
| } |
| |
| 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", |
| "../modules/audio_device:audio_device_java", |
| "../rtc_base:base_java", |
| "../sdk/android:libjingle_peerconnection_java", |
| "../sdk/android:libjingle_peerconnection_metrics_default_java", |
| "//third_party/android_deps:android_support_annotations_java", |
| ] |
| } |
| } |
| |
| if (!build_with_chromium) { |
| # Doesn't build within Chrome on Win. |
| rtc_executable("stun_prober") { |
| testonly = true |
| sources = [ |
| "stunprober/main.cc", |
| ] |
| |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from Chrome's Clang plugins. |
| # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| } |
| |
| deps = [ |
| "../p2p:libstunprober", |
| "../p2p:rtc_p2p", |
| "../rtc_base:checks", |
| "../rtc_base:rtc_base", |
| "../rtc_base:rtc_base_approved", |
| ] |
| } |
| } |