From 134aeeec27e1cd2b96135af2b5533502ce841fcf Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Tue, 16 Jul 2019 19:25:17 +0200 Subject: [PATCH] Allow using base jni targets on Linux Change-Id: I227e0dc08b41dd944f0e4193ef68c03848ddcdaa Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145730 Reviewed-by: Mirko Bonadei Reviewed-by: Magnus Jedvert Commit-Queue: Oleh Prypin Cr-Commit-Position: refs/heads/master@{#28586} --- sdk/android/BUILD.gn | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sdk/android/BUILD.gn b/sdk/android/BUILD.gn index aaf2728845..4adb00d289 100644 --- a/sdk/android/BUILD.gn +++ b/sdk/android/BUILD.gn @@ -840,7 +840,9 @@ if (is_android) { ":libvpx_vp9_jni", ] } +} +if (current_os == "linux" || is_android) { ###################### # Native API targets # ###################### @@ -877,7 +879,9 @@ if (is_android) { "//third_party/abseil-cpp/absl/types:optional", ] } +} +if (is_android) { rtc_static_library("native_api_base") { visibility = [ "*" ] sources = [ @@ -1011,7 +1015,9 @@ if (is_android) { "//rtc_base:base_java", ] } +} +if (current_os == "linux" || is_android) { # Internal code that is needed by native_api_jni. The code cannot be placed in # base_jni because native_api_jni depends on the code (and base_jni depends on # native_api_jni). @@ -1025,7 +1031,9 @@ if (is_android) { "../../rtc_base:checks", ] } +} +if (is_android) { rtc_static_library("videoframe_jni") { sources = [ "src/jni/video_frame.cc", @@ -1163,7 +1171,9 @@ if (is_android) { "//third_party/abseil-cpp/absl/types:optional", ] } +} +if (current_os == "linux" || is_android) { ######################### # Generated JNI targets # ######################### @@ -1344,7 +1354,9 @@ if (is_android) { namespace = "webrtc::jni" jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" } +} +if (is_android) { ################ # Test targets # ################