Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(753)

Unified Diff: webrtc/api/api.gyp

Issue 1610243002: Move talk/app/webrtc to webrtc/api (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updated location for peerconnection_unittests.isolate Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/api/api.gyp
diff --git a/webrtc/api/api.gyp b/webrtc/api/api.gyp
index 5f848d7663c71d77c90737b01d9156e86c9fc358..e4fa732296108a67e7ce394bd5ae0d11b3a1c667 100644
--- a/webrtc/api/api.gyp
+++ b/webrtc/api/api.gyp
@@ -9,6 +9,271 @@
{
'includes': [ '../build/common.gypi', ],
'conditions': [
+ ['os_posix == 1 and OS != "mac" and OS != "ios"', {
+ 'conditions': [
+ ['sysroot!=""', {
+ 'variables': {
+ 'pkg-config': '../../../build/linux/pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
+ },
+ }, {
+ 'variables': {
+ 'pkg-config': 'pkg-config'
+ },
+ }],
+ ],
+ }],
+ ['OS=="linux" or OS=="android"', {
+ 'targets': [
+ {
+ 'target_name': 'libjingle_peerconnection_jni',
+ 'type': 'static_library',
+ 'dependencies': [
+ '<(webrtc_root)/system_wrappers/system_wrappers.gyp:field_trial_default',
+ 'libjingle_peerconnection',
+ ],
+ 'sources': [
+ 'java/jni/classreferenceholder.cc',
+ 'java/jni/classreferenceholder.h',
+ 'java/jni/jni_helpers.cc',
+ 'java/jni/jni_helpers.h',
+ 'java/jni/native_handle_impl.cc',
+ 'java/jni/native_handle_impl.h',
+ 'java/jni/peerconnection_jni.cc',
+ ],
+ 'include_dirs': [
+ '<(libyuv_dir)/include',
+ ],
+ # TODO(kjellander): Make the code compile without disabling these flags.
+ # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
+ 'cflags': [
+ '-Wno-sign-compare',
+ '-Wno-unused-variable',
+ ],
+ 'cflags!': [
+ '-Wextra',
+ ],
+ 'cflags_cc!': [
+ '-Wnon-virtual-dtor',
+ '-Woverloaded-virtual',
+ ],
+ 'msvs_disabled_warnings': [
+ 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch.
+ 4267, # conversion from 'size_t' to 'int', possible loss of data.
+ 4389, # signed/unsigned mismatch.
+ ],
+ 'conditions': [
+ ['OS=="linux"', {
+ 'include_dirs': [
+ '<(java_home)/include',
+ '<(java_home)/include/linux',
+ ],
+ }],
+ ['build_json==1', {
+ 'dependencies': [
+ '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
+ ],
+ 'export_dependent_settings': [
+ '<(DEPTH)/third_party/jsoncpp/jsoncpp.gyp:jsoncpp',
+ ],
+ }],
+ ['OS=="android"', {
+ 'sources': [
+ 'androidvideocapturer.cc',
+ 'androidvideocapturer.h',
+ 'java/jni/androidmediacodeccommon.h',
+ 'java/jni/androidmediadecoder_jni.cc',
+ 'java/jni/androidmediadecoder_jni.h',
+ 'java/jni/androidmediaencoder_jni.cc',
+ 'java/jni/androidmediaencoder_jni.h',
+ 'java/jni/androidnetworkmonitor_jni.cc',
+ 'java/jni/androidnetworkmonitor_jni.h',
+ 'java/jni/androidvideocapturer_jni.cc',
+ 'java/jni/androidvideocapturer_jni.h',
+ 'java/jni/surfacetexturehelper_jni.cc',
+ 'java/jni/surfacetexturehelper_jni.h',
+ ]
+ }],
+ ],
+ },
+ {
+ 'target_name': 'libjingle_peerconnection_so',
+ 'type': 'shared_library',
+ 'dependencies': [
+ 'libjingle_peerconnection',
+ 'libjingle_peerconnection_jni',
+ ],
+ 'sources': [
+ 'java/jni/jni_onload.cc',
+ ],
+ 'variables': {
+ # This library uses native JNI exports; tell GYP so that the
+ # required symbols will be kept.
+ 'use_native_jni_exports': 1,
+ },
+ 'conditions': [
+ ['OS=="linux"', {
+ 'defines': [
+ 'HAVE_GTK',
+ ],
+ 'include_dirs': [
+ '<(java_home)/include',
+ '<(java_home)/include/linux',
+ ],
+ 'conditions': [
+ ['use_gtk==1', {
+ 'link_settings': {
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l gobject-2.0 gthread-2.0'
+ ' gtk+-2.0)',
+ ],
+ },
+ }],
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'libjingle_peerconnection_jar',
+ 'type': 'none',
+ 'actions': [
+ {
+ # TODO(jiayl): extract peerconnection_java_files and android_java_files into a webrtc
+ # gyp var that can be included here, or better yet, build a proper .jar in webrtc
+ # and include it here.
+ 'variables': {
+ 'java_src_dir': 'java/src',
+ 'webrtc_base_dir': '<(webrtc_root)/base',
+ 'webrtc_modules_dir': '<(webrtc_root)/modules',
+ 'build_jar_log': '<(INTERMEDIATE_DIR)/build_jar.log',
+ 'peerconnection_java_files': [
+ 'java/src/org/webrtc/AudioSource.java',
+ 'java/src/org/webrtc/AudioTrack.java',
+ 'java/src/org/webrtc/CallSessionFileRotatingLogSink.java',
+ 'java/src/org/webrtc/DataChannel.java',
+ 'java/src/org/webrtc/IceCandidate.java',
+ 'java/src/org/webrtc/MediaConstraints.java',
+ 'java/src/org/webrtc/MediaSource.java',
+ 'java/src/org/webrtc/MediaStream.java',
+ 'java/src/org/webrtc/MediaStreamTrack.java',
+ 'java/src/org/webrtc/PeerConnectionFactory.java',
+ 'java/src/org/webrtc/PeerConnection.java',
+ 'java/src/org/webrtc/RtpReceiver.java',
+ 'java/src/org/webrtc/RtpSender.java',
+ 'java/src/org/webrtc/SdpObserver.java',
+ 'java/src/org/webrtc/StatsObserver.java',
+ 'java/src/org/webrtc/StatsReport.java',
+ 'java/src/org/webrtc/SessionDescription.java',
+ 'java/src/org/webrtc/VideoCapturer.java',
+ 'java/src/org/webrtc/VideoRenderer.java',
+ 'java/src/org/webrtc/VideoSource.java',
+ 'java/src/org/webrtc/VideoTrack.java',
+ '<(webrtc_base_dir)/java/src/org/webrtc/Logging.java',
+ ],
+ 'android_java_files': [
+ 'java/android/org/webrtc/Camera2Enumerator.java',
+ 'java/android/org/webrtc/CameraEnumerationAndroid.java',
+ 'java/android/org/webrtc/CameraEnumerator.java',
+ 'java/android/org/webrtc/EglBase.java',
+ 'java/android/org/webrtc/EglBase10.java',
+ 'java/android/org/webrtc/EglBase14.java',
+ 'java/android/org/webrtc/GlRectDrawer.java',
+ 'java/android/org/webrtc/GlShader.java',
+ 'java/android/org/webrtc/GlUtil.java',
+ 'java/android/org/webrtc/GlTextureFrameBuffer.java',
+ 'java/android/org/webrtc/NetworkMonitor.java',
+ 'java/android/org/webrtc/NetworkMonitorAutoDetect.java',
+ 'java/android/org/webrtc/RendererCommon.java',
+ 'java/android/org/webrtc/SurfaceTextureHelper.java',
+ 'java/android/org/webrtc/SurfaceViewRenderer.java',
+ 'java/android/org/webrtc/ThreadUtils.java',
+ 'java/android/org/webrtc/VideoCapturerAndroid.java',
+ 'java/android/org/webrtc/VideoRendererGui.java',
+ 'java/src/org/webrtc/MediaCodecVideoDecoder.java',
+ 'java/src/org/webrtc/MediaCodecVideoEncoder.java',
+ '<(webrtc_modules_dir)/video_render/android/java/src/org/webrtc/videoengine/ViEAndroidGLES20.java',
+ '<(webrtc_modules_dir)/video_render/android/java/src/org/webrtc/videoengine/ViERenderer.java',
+ '<(webrtc_modules_dir)/video_render/android/java/src/org/webrtc/videoengine/ViESurfaceRenderer.java',
+ '<(webrtc_modules_dir)/audio_device/android/java/src/org/webrtc/voiceengine/BuildInfo.java',
+ '<(webrtc_modules_dir)/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioEffects.java',
+ '<(webrtc_modules_dir)/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioManager.java',
+ '<(webrtc_modules_dir)/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioUtils.java',
+ '<(webrtc_modules_dir)/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioRecord.java',
+ '<(webrtc_modules_dir)/audio_device/android/java/src/org/webrtc/voiceengine/WebRtcAudioTrack.java',
+ ],
+ },
+ 'action_name': 'create_jar',
+ 'inputs': [
+ '../build/build_jar.sh',
+ '<@(java_files)',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/libjingle_peerconnection.jar',
+ ],
+ 'conditions': [
+ ['OS=="android"', {
+ 'variables': {
+ 'java_files': ['<@(peerconnection_java_files)', '<@(android_java_files)'],
+ 'build_classpath': '<(java_src_dir):<(DEPTH)/third_party/android_tools/sdk/platforms/android-<(android_sdk_version)/android.jar',
+ },
+ }, {
+ 'variables': {
+ 'java_files': ['<@(peerconnection_java_files)'],
+ 'build_classpath': '<(java_src_dir)',
+ },
+ }],
+ ],
+ 'action': [
+ 'bash', '-ec',
+ 'mkdir -p <(INTERMEDIATE_DIR) && '
+ '{ ../build/build_jar.sh <(java_home) <@(_outputs) '
+ ' <(INTERMEDIATE_DIR)/build_jar.tmp '
+ ' <(build_classpath) <@(java_files) '
+ ' > <(build_jar_log) 2>&1 || '
+ ' { cat <(build_jar_log) ; exit 1; } }'
+ ],
+ },
+ ],
+ 'dependencies': [
+ 'libjingle_peerconnection_so',
+ ],
+ },
+ ],
+ }],
+ ['OS=="android"', {
+ 'targets': [
+ {
+ # |libjingle_peerconnection_java| builds a jar file with name
+ # libjingle_peerconnection_java.jar using Chromes build system.
+ # It includes all Java files needed to setup a PeeerConnection call
+ # from Android.
+ # TODO(perkj): Consider replacing the use of
+ # libjingle_peerconnection_jar with this target everywhere.
+ 'target_name': 'libjingle_peerconnection_java',
+ 'type': 'none',
+ 'dependencies': [
+ 'libjingle_peerconnection_so',
+ ],
+ 'variables': {
+ # Designate as Chromium code and point to our lint settings to
+ # enable linting of the WebRTC code (this is the only way to make
+ # lint_action invoke the Android linter).
+ 'android_manifest_path': '<(webrtc_root)/build/android/AndroidManifest.xml',
+ 'suppressions_file': '<(webrtc_root)/build/android/suppressions.xml',
+ 'chromium_code': 1,
+ 'java_in_dir': 'java',
+ 'webrtc_base_dir': '<(webrtc_root)/base',
+ 'webrtc_modules_dir': '<(webrtc_root)/modules',
+ 'additional_src_dirs' : [
+ 'java/android',
+ '<(webrtc_base_dir)/java/src',
+ '<(webrtc_modules_dir)/audio_device/android/java/src',
+ '<(webrtc_modules_dir)/video_render/android/java/src',
+ ],
+ },
+ 'includes': ['../../build/java.gypi'],
+ }, # libjingle_peerconnection_java
+ ]
+ }],
['OS=="ios"', {
'targets': [
{
@@ -16,7 +281,7 @@
'type': 'static_library',
'dependencies': [
'<(webrtc_root)/base/base.gyp:rtc_base_objc',
- '../../talk/libjingle.gyp:libjingle_peerconnection',
+ 'libjingle_peerconnection',
],
'sources': [
'objc/RTCAVFoundationVideoSource+Private.h',
@@ -82,7 +347,17 @@
'-framework QuartzCore',
]
}
- }
+ },
+ # TODO(kjellander): Make the code compile without disabling these.
+ # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
+ 'cflags': [
+ '-Wno-return-type',
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS': [
+ '-Wno-return-type',
+ ],
+ },
}],
['OS=="mac"', {
'sources': [
@@ -98,6 +373,129 @@
},
}
],
- }], # OS=="ios"
- ],
+ }], # OS=="ios"
+ ], # conditions
+ 'targets': [
+ {
+ 'target_name': 'libjingle_peerconnection',
+ 'type': 'static_library',
+ 'dependencies': [
+ '../../talk/libjingle.gyp:libjingle',
+ '../../talk/libjingle.gyp:libjingle_media',
+ '../../talk/libjingle.gyp:libjingle_p2p',
+ ],
+ 'sources': [
+ 'audiotrack.cc',
+ 'audiotrack.h',
+ 'datachannel.cc',
+ 'datachannel.h',
+ 'datachannelinterface.h',
+ 'dtlsidentitystore.cc',
+ 'dtlsidentitystore.h',
+ 'dtmfsender.cc',
+ 'dtmfsender.h',
+ 'dtmfsenderinterface.h',
+ 'jsep.h',
+ 'jsepicecandidate.cc',
+ 'jsepicecandidate.h',
+ 'jsepsessiondescription.cc',
+ 'jsepsessiondescription.h',
+ 'localaudiosource.cc',
+ 'localaudiosource.h',
+ 'mediaconstraintsinterface.cc',
+ 'mediaconstraintsinterface.h',
+ 'mediacontroller.cc',
+ 'mediacontroller.h',
+ 'mediastream.cc',
+ 'mediastream.h',
+ 'mediastreaminterface.h',
+ 'mediastreamobserver.cc',
+ 'mediastreamobserver.h',
+ 'mediastreamprovider.h',
+ 'mediastreamproxy.h',
+ 'mediastreamtrack.h',
+ 'mediastreamtrackproxy.h',
+ 'notifier.h',
+ 'peerconnection.cc',
+ 'peerconnection.h',
+ 'peerconnectionfactory.cc',
+ 'peerconnectionfactory.h',
+ 'peerconnectionfactoryproxy.h',
+ 'peerconnectioninterface.h',
+ 'peerconnectionproxy.h',
+ 'proxy.h',
+ 'remoteaudiosource.cc',
+ 'remoteaudiosource.h',
+ 'remotevideocapturer.cc',
+ 'remotevideocapturer.h',
+ 'rtpreceiver.cc',
+ 'rtpreceiver.h',
+ 'rtpreceiverinterface.h',
+ 'rtpsender.cc',
+ 'rtpsender.h',
+ 'rtpsenderinterface.h',
+ 'sctputils.cc',
+ 'sctputils.h',
+ 'statscollector.cc',
+ 'statscollector.h',
+ 'statstypes.cc',
+ 'statstypes.h',
+ 'streamcollection.h',
+ 'videosource.cc',
+ 'videosource.h',
+ 'videosourceinterface.h',
+ 'videosourceproxy.h',
+ 'videotrack.cc',
+ 'videotrack.h',
+ 'videotrackrenderers.cc',
+ 'videotrackrenderers.h',
+ 'webrtcsdp.cc',
+ 'webrtcsdp.h',
+ 'webrtcsession.cc',
+ 'webrtcsession.h',
+ 'webrtcsessiondescriptionfactory.cc',
+ 'webrtcsessiondescriptionfactory.h',
+ ],
+ # TODO(kjellander): Make the code compile without disabling these flags.
+ # See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
+ 'cflags': [
+ '-Wno-sign-compare',
+ ],
+ 'cflags_cc!': [
+ '-Wnon-virtual-dtor',
+ '-Woverloaded-virtual',
+ ],
+ 'conditions': [
+ ['clang==1', {
+ 'cflags!': [
+ '-Wextra',
+ ],
+ 'xcode_settings': {
+ 'WARNING_CFLAGS!': ['-Wextra'],
+ },
+ }, {
+ 'cflags': [
+ '-Wno-maybe-uninitialized', # Only exists for GCC.
+ ],
+ }],
+ ['OS=="win"', {
+ # Disable warning for signed/unsigned mismatch.
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'AdditionalOptions!': ['/we4389'],
+ },
+ },
+ }],
+ ['OS=="win" and clang==1', {
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'AdditionalOptions': [
+ '-Wno-sign-compare',
+ ],
+ },
+ },
+ }],
+ ],
+ }, # target libjingle_peerconnection
+ ], # targets
}

Powered by Google App Engine
This is Rietveld 408576698