blob: 0f6312780133ea46fc6d67a3440f4fd1261e5061 [file] [log] [blame]
# Copyright 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("../build/webrtc.gni")
import("//build_overrides/webrtc.gni")
import("//build/config/mac/mac_sdk.gni")
if (is_ios || (is_mac && mac_deployment_target == "10.7")) {
config("rtc_sdk_common_objc_config") {
include_dirs = [
"objc/Framework/Classes",
"objc/Framework/Headers",
]
}
source_set("rtc_sdk_common_objc") {
deps = [
"../base:rtc_base",
]
configs += [
"..:common_config",
"//build/config/compiler:enable_arc",
]
public_configs = [
"..:common_inherited_config",
":rtc_sdk_common_objc_config",
]
sources = [
"objc/Framework/Classes/NSString+StdString.h",
"objc/Framework/Classes/NSString+StdString.mm",
"objc/Framework/Classes/RTCDispatcher.m",
"objc/Framework/Classes/RTCFieldTrials.mm",
"objc/Framework/Classes/RTCLogging.mm",
"objc/Framework/Classes/RTCMetrics.mm",
"objc/Framework/Classes/RTCMetricsSampleInfo+Private.h",
"objc/Framework/Classes/RTCMetricsSampleInfo.mm",
"objc/Framework/Classes/RTCSSLAdapter.mm",
"objc/Framework/Classes/RTCTracing.mm",
"objc/Framework/Headers/WebRTC/RTCDispatcher.h",
"objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
"objc/Framework/Headers/WebRTC/RTCLogging.h",
"objc/Framework/Headers/WebRTC/RTCMacros.h",
"objc/Framework/Headers/WebRTC/RTCMetrics.h",
"objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
"objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
"objc/Framework/Headers/WebRTC/RTCTracing.h",
]
if (is_ios) {
sources += [
"objc/Framework/Classes/RTCCameraPreviewView.m",
"objc/Framework/Classes/RTCUIApplication.h",
"objc/Framework/Classes/RTCUIApplication.mm",
"objc/Framework/Classes/UIDevice+RTCDevice.mm",
"objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h",
"objc/Framework/Headers/WebRTC/UIDevice+RTCDevice.h",
]
libs = [ "AVFoundation.framework" ]
}
if (!build_with_chromium) {
sources += [
"objc/Framework/Classes/RTCFileLogger.mm",
"objc/Framework/Headers/WebRTC/RTCFileLogger.h",
]
}
}
source_set("rtc_sdk_peerconnection_objc") {
sources = [
"objc/Framework/Classes/RTCAVFoundationVideoSource+Private.h",
"objc/Framework/Classes/RTCAVFoundationVideoSource.mm",
"objc/Framework/Classes/RTCAudioSource+Private.h",
"objc/Framework/Classes/RTCAudioSource.mm",
"objc/Framework/Classes/RTCAudioTrack+Private.h",
"objc/Framework/Classes/RTCAudioTrack.mm",
"objc/Framework/Classes/RTCConfiguration+Private.h",
"objc/Framework/Classes/RTCConfiguration.mm",
"objc/Framework/Classes/RTCDataChannel+Private.h",
"objc/Framework/Classes/RTCDataChannel.mm",
"objc/Framework/Classes/RTCDataChannelConfiguration+Private.h",
"objc/Framework/Classes/RTCDataChannelConfiguration.mm",
"objc/Framework/Classes/RTCI420Shader.mm",
"objc/Framework/Classes/RTCIceCandidate+Private.h",
"objc/Framework/Classes/RTCIceCandidate.mm",
"objc/Framework/Classes/RTCIceServer+Private.h",
"objc/Framework/Classes/RTCIceServer.mm",
"objc/Framework/Classes/RTCMediaConstraints+Private.h",
"objc/Framework/Classes/RTCMediaConstraints.mm",
"objc/Framework/Classes/RTCMediaSource+Private.h",
"objc/Framework/Classes/RTCMediaSource.mm",
"objc/Framework/Classes/RTCMediaStream+Private.h",
"objc/Framework/Classes/RTCMediaStream.mm",
"objc/Framework/Classes/RTCMediaStreamTrack+Private.h",
"objc/Framework/Classes/RTCMediaStreamTrack.mm",
"objc/Framework/Classes/RTCOpenGLDefines.h",
"objc/Framework/Classes/RTCOpenGLVideoRenderer.h",
"objc/Framework/Classes/RTCOpenGLVideoRenderer.mm",
"objc/Framework/Classes/RTCPeerConnection+DataChannel.mm",
"objc/Framework/Classes/RTCPeerConnection+Private.h",
"objc/Framework/Classes/RTCPeerConnection+Stats.mm",
"objc/Framework/Classes/RTCPeerConnection.mm",
"objc/Framework/Classes/RTCPeerConnectionFactory+Private.h",
"objc/Framework/Classes/RTCPeerConnectionFactory.mm",
"objc/Framework/Classes/RTCRtpCodecParameters+Private.h",
"objc/Framework/Classes/RTCRtpCodecParameters.mm",
"objc/Framework/Classes/RTCRtpEncodingParameters+Private.h",
"objc/Framework/Classes/RTCRtpEncodingParameters.mm",
"objc/Framework/Classes/RTCRtpParameters+Private.h",
"objc/Framework/Classes/RTCRtpParameters.mm",
"objc/Framework/Classes/RTCRtpReceiver+Private.h",
"objc/Framework/Classes/RTCRtpReceiver.mm",
"objc/Framework/Classes/RTCRtpSender+Private.h",
"objc/Framework/Classes/RTCRtpSender.mm",
"objc/Framework/Classes/RTCSessionDescription+Private.h",
"objc/Framework/Classes/RTCSessionDescription.mm",
"objc/Framework/Classes/RTCShader+Private.h",
"objc/Framework/Classes/RTCShader.h",
"objc/Framework/Classes/RTCShader.mm",
"objc/Framework/Classes/RTCStatsReport+Private.h",
"objc/Framework/Classes/RTCStatsReport.mm",
"objc/Framework/Classes/RTCVideoFrame+Private.h",
"objc/Framework/Classes/RTCVideoFrame.mm",
"objc/Framework/Classes/RTCVideoRendererAdapter+Private.h",
"objc/Framework/Classes/RTCVideoRendererAdapter.h",
"objc/Framework/Classes/RTCVideoRendererAdapter.mm",
"objc/Framework/Classes/RTCVideoSource+Private.h",
"objc/Framework/Classes/RTCVideoSource.mm",
"objc/Framework/Classes/RTCVideoTrack+Private.h",
"objc/Framework/Classes/RTCVideoTrack.mm",
"objc/Framework/Classes/avfoundationvideocapturer.h",
"objc/Framework/Classes/avfoundationvideocapturer.mm",
"objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h",
"objc/Framework/Headers/WebRTC/RTCAudioSource.h",
"objc/Framework/Headers/WebRTC/RTCAudioTrack.h",
"objc/Framework/Headers/WebRTC/RTCConfiguration.h",
"objc/Framework/Headers/WebRTC/RTCDataChannel.h",
"objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h",
"objc/Framework/Headers/WebRTC/RTCIceCandidate.h",
"objc/Framework/Headers/WebRTC/RTCIceServer.h",
"objc/Framework/Headers/WebRTC/RTCMediaConstraints.h",
"objc/Framework/Headers/WebRTC/RTCMediaSource.h",
"objc/Framework/Headers/WebRTC/RTCMediaStream.h",
"objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h",
"objc/Framework/Headers/WebRTC/RTCPeerConnection.h",
"objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h",
"objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h",
"objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h",
"objc/Framework/Headers/WebRTC/RTCRtpParameters.h",
"objc/Framework/Headers/WebRTC/RTCRtpReceiver.h",
"objc/Framework/Headers/WebRTC/RTCRtpSender.h",
"objc/Framework/Headers/WebRTC/RTCSessionDescription.h",
"objc/Framework/Headers/WebRTC/RTCStatsReport.h",
"objc/Framework/Headers/WebRTC/RTCVideoFrame.h",
"objc/Framework/Headers/WebRTC/RTCVideoRenderer.h",
"objc/Framework/Headers/WebRTC/RTCVideoSource.h",
"objc/Framework/Headers/WebRTC/RTCVideoTrack.h",
]
if (is_ios) {
sources += [
"objc/Framework/Classes/RTCEAGLVideoView.m",
"objc/Framework/Classes/RTCNativeNV12Shader.mm",
"objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h",
]
libs = [
"CoreGraphics.framework",
"GLKit.framework",
"OpenGLES.framework",
"QuartzCore.framework",
]
}
if (is_mac) {
sources += [
"objc/Framework/Classes/RTCNSGLVideoView.m",
"objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h",
]
libs = [
"CoreMedia.framework",
"OpenGL.framework",
]
}
configs += [
"..:common_objc",
"//build/config/compiler:enable_arc",
]
public_configs = [ ":rtc_sdk_common_objc_config" ]
if (is_clang) {
# Suppress warnings from the Chromium Clang plugins.
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
configs -= [ "//build/config/clang:find_bad_constructs" ]
}
libs += [ "AVFoundation.framework" ]
deps = [
":rtc_sdk_common_objc",
"../api:libjingle_peerconnection",
]
if (rtc_build_libyuv) {
deps += [ "$rtc_libyuv_dir" ]
public_deps = [
"$rtc_libyuv_dir",
]
}
}
# TODO(tkchin): Add the rtc_sdk_framework_objc target.
}