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",
]
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",
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) {
":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
--- /dev/null
+# 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",
+ ]
+}