diff options
author | Jim Van Verth <jvanverth@google.com> | 2016-10-21 10:58:52 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-10-21 15:19:32 +0000 |
commit | 4e56a91393733359ba19967a78df26184e53854e (patch) | |
tree | e21e3189b47c3690923038523f012eefee8228a2 | |
parent | 9cdd2abc30520d6f425afbc2d7bd7b15f8b11ba1 (diff) |
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>
-rw-r--r-- | BUILD.gn | 23 | ||||
-rw-r--r-- | third_party/native_app_glue/BUILD.gn | 17 |
2 files changed, 35 insertions, 5 deletions
@@ -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 diff --git a/third_party/native_app_glue/BUILD.gn b/third_party/native_app_glue/BUILD.gn new file mode 100644 index 0000000000..a25065bb60 --- /dev/null +++ b/third_party/native_app_glue/BUILD.gn @@ -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", + ] +} |