Add Android viewer to GN
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3761 Change-Id: If971e275ed377cd733d01f62622d408479632465 Reviewed-on: https://skia-review.googlesource.com/3761 Commit-Queue: Jim Van Verth <jvanverth@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
This commit is contained in:
parent
9cdd2abc30
commit
4e56a91393
23
BUILD.gn
23
BUILD.gn
@ -928,8 +928,7 @@ if (skia_enable_tools) {
|
||||
if (!is_android) {
|
||||
sources += [ "src/views/SkWindow.cpp" ]
|
||||
}
|
||||
if (is_android) {
|
||||
} else if (is_linux) {
|
||||
if (is_linux) {
|
||||
public_include_dirs += [ "src/views/unix" ]
|
||||
sources += [
|
||||
"src/views/unix/SkOSWindow_Unix.cpp",
|
||||
@ -1197,7 +1196,15 @@ if (skia_enable_tools) {
|
||||
]
|
||||
libs = []
|
||||
|
||||
if (is_linux) {
|
||||
if (is_android) {
|
||||
sources += [
|
||||
"tools/viewer/sk_app/android/GLWindowContext_android.cpp",
|
||||
"tools/viewer/sk_app/android/RasterWindowContext_android.cpp",
|
||||
"tools/viewer/sk_app/android/Window_android.cpp",
|
||||
"tools/viewer/sk_app/android/main_android.cpp",
|
||||
"tools/viewer/sk_app/android/surface_glue_android.cpp",
|
||||
]
|
||||
} else if (is_linux) {
|
||||
sources += [
|
||||
"tools/viewer/sk_app/unix/GLWindowContext_unix.cpp",
|
||||
"tools/viewer/sk_app/unix/RasterWindowContext_unix.cpp",
|
||||
@ -1222,7 +1229,11 @@ if (skia_enable_tools) {
|
||||
|
||||
if (skia_use_vulkan) {
|
||||
sources += [ "tools/viewer/sk_app/VulkanWindowContext.cpp" ]
|
||||
if (is_linux) {
|
||||
if (is_android) {
|
||||
sources +=
|
||||
[ "tools/viewer/sk_app/android/VulkanWindowContext_android.cpp" ]
|
||||
libs += [ "android" ]
|
||||
} else if (is_linux) {
|
||||
sources += [ "tools/viewer/sk_app/unix/VulkanWindowContext_unix.cpp" ]
|
||||
libs += [ "X11-xcb" ]
|
||||
} else if (is_win) {
|
||||
@ -1241,7 +1252,9 @@ if (skia_enable_tools) {
|
||||
":views",
|
||||
"//third_party/jsoncpp",
|
||||
]
|
||||
if (is_mac) {
|
||||
if (is_android) {
|
||||
deps += [ "//third_party/native_app_glue" ]
|
||||
} else if (is_mac) {
|
||||
deps += [ "//third_party/libsdl" ]
|
||||
}
|
||||
testonly = true
|
||||
|
17
third_party/native_app_glue/BUILD.gn
vendored
Normal file
17
third_party/native_app_glue/BUILD.gn
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright 2016 Google Inc.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
declare_args() {
|
||||
}
|
||||
|
||||
import("../third_party.gni")
|
||||
|
||||
third_party("native_app_glue") {
|
||||
public_include_dirs = [ "$ndk/sources/android/native_app_glue" ]
|
||||
|
||||
sources = [
|
||||
"$ndk/sources/android/native_app_glue/android_native_app_glue.c",
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user