diff options
-rw-r--r-- | build/all.gyp | 7 | ||||
-rw-r--r-- | third_party/libjingle/BUILD.gn | 34 | ||||
-rw-r--r-- | third_party/libjingle/libjingle.gyp | 29 |
3 files changed, 70 insertions, 0 deletions
diff --git a/build/all.gyp b/build/all.gyp index 2dbd4fb..e9eaa5b 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -836,6 +836,13 @@ # Unit test bundles packaged as an apk. '../content/content_shell_and_tests.gyp:content_browsertests_apk', ], + 'conditions': [ + ['"<(libpeer_target_type)"=="static_library"', { + 'dependencies': [ + '../third_party/libjingle/libjingle.gyp:libjingle_peerconnection_javalib', + ], + }], + ], }, # target_name: android_builder_chromium_webrtc ], # targets }], # OS="android" diff --git a/third_party/libjingle/BUILD.gn b/third_party/libjingle/BUILD.gn index 02c2bf9..fb01a64 100644 --- a/third_party/libjingle/BUILD.gn +++ b/third_party/libjingle/BUILD.gn @@ -553,6 +553,40 @@ if (enable_webrtc) { ] } + source_set("libjingle_peerconnection_so") { + sources = [ + "source/talk/app/webrtc/java/jni/peerconnection_jni.cc", + ] + deps = [ + "libjingle_webrtc", + "libpeerconnection", + ] + } + + android_library("libjingle_peerconnection_java") { + java_files = [ + "source/talk/app/webrtc/java/src/org/webrtc/AudioSource.java", + "source/talk/app/webrtc/java/src/org/webrtc/AudioTrack.java", + "source/talk/app/webrtc/java/src/org/webrtc/DataChannel.java", + "source/talk/app/webrtc/java/src/org/webrtc/IceCandidate.java", + "source/talk/app/webrtc/java/src/org/webrtc/Logging.java", + "source/talk/app/webrtc/java/src/org/webrtc/MediaConstraints.java", + "source/talk/app/webrtc/java/src/org/webrtc/MediaSource.java", + "source/talk/app/webrtc/java/src/org/webrtc/MediaStream.java", + "source/talk/app/webrtc/java/src/org/webrtc/MediaStreamTrack.java", + "source/talk/app/webrtc/java/src/org/webrtc/PeerConnectionFactory.java", + "source/talk/app/webrtc/java/src/org/webrtc/PeerConnection.java", + "source/talk/app/webrtc/java/src/org/webrtc/SdpObserver.java", + "source/talk/app/webrtc/java/src/org/webrtc/StatsObserver.java", + "source/talk/app/webrtc/java/src/org/webrtc/StatsReport.java", + "source/talk/app/webrtc/java/src/org/webrtc/SessionDescription.java", + "source/talk/app/webrtc/java/src/org/webrtc/VideoCapturer.java", + "source/talk/app/webrtc/java/src/org/webrtc/VideoRenderer.java", + "source/talk/app/webrtc/java/src/org/webrtc/VideoSource.java", + "source/talk/app/webrtc/java/src/org/webrtc/VideoTrack.java", + ] + } + } # enable_webrtc # TODO(GYP): Port libjingle.gyp's enable_webrtc condition block. diff --git a/third_party/libjingle/libjingle.gyp b/third_party/libjingle/libjingle.gyp index 0eaf86c..9b26732 100644 --- a/third_party/libjingle/libjingle.gyp +++ b/third_party/libjingle/libjingle.gyp @@ -646,5 +646,34 @@ }, # target libpeerconnection ], }], + ['enable_webrtc==1 and OS=="android" and "<(libpeer_target_type)"=="static_library"', { + 'targets': [ + { + # GN version: //third_party/libjingle:libjingle_peerconnection_so + 'target_name': 'libjingle_peerconnection_so', + 'type': 'shared_library', + 'dependencies': [ + '<(DEPTH)/third_party/icu/icu.gyp:icuuc', + 'libjingle_webrtc', + 'libpeerconnection', + ], + 'sources': [ + '<(libjingle_source)/talk/app/webrtc/java/jni/peerconnection_jni.cc', + ], + }, + { + # GN version: //third_party/libjingle:libjingle_peerconnection_java + 'target_name': 'libjingle_peerconnection_javalib', + 'type': 'none', + 'variables': { + 'java_in_dir': '<(libjingle_source)/talk/app/webrtc/java', + }, + 'dependencies': [ + 'libjingle_peerconnection_so', + ], + 'includes': [ '../../build/java.gypi' ], + }, + ], + }], ], } |