# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("gn/flutter_defines.gni")
import("gn/fuchsia_defines.gni")
import("gn/shared_sources.gni")
import("gn/skia.gni")

if (is_fuchsia) {
  import("//build/fuchsia/sdk.gni")
  import("build/fuchsia/fuchsia_download_sdk.gni")
}

if (skia_use_dawn) {
  import("third_party/externals/dawn/scripts/dawn_features.gni")
}

if (defined(skia_settings)) {
  import(skia_settings)
}

import("gn/ios.gni")

# Skia public API, generally provided by :skia.
config("skia_public") {
  include_dirs = [ "." ]

  defines = []
  cflags_objcc = []
  if (is_component_build) {
    defines += [ "SKIA_DLL" ]
  }
  if (is_fuchsia || is_linux) {
    defines += [ "SK_R32_SHIFT=16" ]
  }
  if (skia_enable_flutter_defines) {
    defines += flutter_defines
  }
  if (!skia_enable_gpu) {
    defines += [ "SK_SUPPORT_GPU=0" ]
  }
  if (skia_enable_atlas_text) {
    defines += [ "SK_SUPPORT_ATLAS_TEXT=1" ]
  }
  if (is_fuchsia) {
    defines += fuchsia_defines
  }
  if (skia_gl_standard == "gles") {
    defines += [ "SK_ASSUME_GL_ES=1" ]
  } else if (skia_gl_standard == "gl") {
    defines += [ "SK_ASSUME_GL=1" ]
  } else if (skia_gl_standard == "webgl") {
    defines += [ "SK_ASSUME_WEBGL=1" ]
  }

  # Some older versions of the Clang toolchain change the visibility of
  # symbols decorated with API_AVAILABLE macro to be visible. Users of such
  # toolchains suppress the use of this macro till toolchain updates are made.
  if (is_mac || is_ios) {
    if (skia_enable_api_available_macro) {
      defines += [ "SK_ENABLE_API_AVAILABLE" ]
    } else {
      cflags_objcc += [ "-Wno-unguarded-availability" ]
    }
  }
}

# Skia internal APIs, used by Skia itself and a few test tools.
config("skia_private") {
  visibility = [ ":*" ]

  defines = [ "SK_GAMMA_APPLY_TO_A8" ]
  if (skia_use_fixed_gamma_text) {
    defines += [
      "SK_GAMMA_EXPONENT=1.4",
      "SK_GAMMA_CONTRAST=0.0",
    ]
  }
  if (is_skia_dev_build) {
    defines += [
      "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1",
      "GR_TEST_UTILS=1",
    ]
  }
  libs = []
  lib_dirs = []
  if (skia_use_gl && skia_use_angle) {
    defines += [ "SK_ANGLE" ]
  }
  if (skia_use_vma) {
    defines += [ "SK_USE_VMA" ]
  }
}

# Any code that's linked into Skia-the-library should use this config via += skia_library_configs.
config("skia_library") {
  visibility = [ ":*" ]
  defines = [ "SKIA_IMPLEMENTATION=1" ]
}

skia_library_configs = [
  ":skia_public",
  ":skia_private",
  ":skia_library",
]

# Use for CPU-specific Skia code that needs particular compiler flags.
template("opts") {
  visibility = [ ":*" ]
  if (invoker.enabled) {
    source_set(target_name) {
      check_includes = false
      forward_variables_from(invoker, "*")
      configs += skia_library_configs
    }
  } else {
    # If not enabled, a phony empty target that swallows all otherwise unused variables.
    source_set(target_name) {
      check_includes = false
      forward_variables_from(invoker,
                             "*",
                             [
                               "sources",
                               "cflags",
                             ])
    }
  }
}

is_x86 = current_cpu == "x64" || current_cpu == "x86"

opts("none") {
  enabled = !is_x86 && current_cpu != "arm" && current_cpu != "arm64"
  sources = skia_opts.none_sources
  cflags = []
}

opts("armv7") {
  enabled = current_cpu == "arm"
  sources = skia_opts.armv7_sources + skia_opts.neon_sources
  cflags = []
}

opts("arm64") {
  enabled = current_cpu == "arm64"
  sources = skia_opts.arm64_sources
  cflags = []
}

opts("crc32") {
  enabled = current_cpu == "arm64"
  sources = skia_opts.crc32_sources
  cflags = [ "-march=armv8-a+crc" ]
}

opts("sse2") {
  enabled = is_x86
  sources = skia_opts.sse2_sources
  if (!is_clang && is_win) {
    defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE2" ]
  } else {
    cflags = [ "-msse2" ]
  }
}

opts("ssse3") {
  enabled = is_x86
  sources = skia_opts.ssse3_sources
  if (!is_clang && is_win) {
    defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSSE3" ]
  } else {
    cflags = [ "-mssse3" ]
  }
}

opts("sse41") {
  enabled = is_x86
  sources = skia_opts.sse41_sources
  if (!is_clang && is_win) {
    defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE41" ]
  } else {
    cflags = [ "-msse4.1" ]
  }
}

opts("sse42") {
  enabled = is_x86
  sources = skia_opts.sse42_sources
  if (!is_clang && is_win) {
    defines = [ "SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE42" ]
  } else {
    cflags = [ "-msse4.2" ]
  }
}

opts("avx") {
  enabled = is_x86
  sources = skia_opts.avx_sources
  if (is_win) {
    cflags = [ "/arch:AVX" ]
  } else {
    cflags = [ "-mavx" ]
    if (is_mac && is_debug) {
      cflags += [ "-O1" ]  # Work around skia:9709
    }
  }
}

opts("hsw") {
  enabled = is_x86
  sources = skia_opts.hsw_sources
  if (is_win) {
    cflags = [ "/arch:AVX2" ]
  } else {
    cflags = [ "-march=haswell" ]
    if (is_mac && is_debug) {
      cflags += [ "-O1" ]  # Work around skia:9709
    }
  }
}

# Any feature of Skia that requires third-party code should be optional and use this template.
template("optional") {
  visibility = [ ":*" ]
  if (invoker.enabled) {
    config(target_name + "_public") {
      if (defined(invoker.public_defines)) {
        defines = invoker.public_defines
      }
      if (defined(invoker.public_configs)) {
        configs = invoker.public_configs
      }
      if (defined(invoker.public_include_dirs)) {
        include_dirs = invoker.public_include_dirs
      }
    }
    source_set(target_name) {
      check_includes = false
      forward_variables_from(invoker,
                             "*",
                             [
                               "public_defines",
                               "sources_when_disabled",
                               "configs_to_remove",
                             ])
      all_dependent_configs = [ ":" + target_name + "_public" ]
      configs += skia_library_configs
      if (defined(invoker.configs_to_remove)) {
        configs -= invoker.configs_to_remove
      }
    }
  } else {
    source_set(target_name) {
      forward_variables_from(invoker,
                             "*",
                             [
                               "public_defines",
                               "public_deps",
                               "deps",
                               "libs",
                               "sources",
                               "sources_when_disabled",
                               "configs_to_remove",
                             ])
      if (defined(invoker.sources_when_disabled)) {
        sources = invoker.sources_when_disabled
      }
      configs += skia_library_configs
    }
  }
}

optional("android_utils") {
  enabled = skia_enable_android_utils

  public = [ "client_utils/android/FrontBufferedStream.h" ]
  public_defines = [ "SK_ENABLE_ANDROID_UTILS" ]
  sources = [ "client_utils/android/FrontBufferedStream.cpp" ]
}

optional("fontmgr_android") {
  enabled = skia_enable_fontmgr_android

  deps = [
    ":typeface_freetype",
    "//third_party/expat",
  ]
  sources = [
    "src/ports/SkFontMgr_android.cpp",
    "src/ports/SkFontMgr_android_factory.cpp",
    "src/ports/SkFontMgr_android_parser.cpp",
  ]
}

optional("fontmgr_custom") {
  enabled = skia_enable_fontmgr_custom

  deps = [ ":typeface_freetype" ]
  sources = [
    "src/ports/SkFontMgr_custom.cpp",
    "src/ports/SkFontMgr_custom.h",
    "src/ports/SkFontMgr_custom_directory.cpp",
    "src/ports/SkFontMgr_custom_directory_factory.cpp",
    "src/ports/SkFontMgr_custom_embedded.cpp",
    "src/ports/SkFontMgr_custom_empty.cpp",
  ]
}

optional("fontmgr_custom_empty") {
  enabled = skia_enable_fontmgr_custom_empty

  deps = [ ":typeface_freetype" ]
  sources = [
    "src/ports/SkFontMgr_custom.cpp",
    "src/ports/SkFontMgr_custom_empty.cpp",
    "src/ports/SkFontMgr_custom_empty_factory.cpp",
  ]
}

optional("fontmgr_empty") {
  enabled = skia_enable_fontmgr_empty
  sources = [ "src/ports/SkFontMgr_empty_factory.cpp" ]
}

optional("fontmgr_fontconfig") {
  enabled = skia_use_freetype && skia_use_fontconfig

  deps = [
    ":typeface_freetype",
    "//third_party:fontconfig",
  ]
  sources = [
    "src/ports/SkFontConfigInterface.cpp",
    "src/ports/SkFontConfigInterface_direct.cpp",
    "src/ports/SkFontConfigInterface_direct_factory.cpp",
    "src/ports/SkFontMgr_FontConfigInterface.cpp",
    "src/ports/SkFontMgr_fontconfig.cpp",
    "src/ports/SkFontMgr_fontconfig_factory.cpp",
  ]
}

optional("fontmgr_fuchsia") {
  enabled = skia_enable_fontmgr_fuchsia

  deps = []

  if (is_fuchsia && using_fuchsia_sdk) {
    deps += [ "//build/fuchsia/fidl:fuchsia.fonts" ]
  } else {
    deps = [ "//sdk/fidl/fuchsia.fonts" ]
  }
  sources = [
    "src/ports/SkFontMgr_fuchsia.cpp",
    "src/ports/SkFontMgr_fuchsia.h",
  ]
}

optional("fontmgr_wasm") {
  enabled = target_cpu == "wasm"
  deps = []

  # custom_embedded has the source for both embedding a font in the binary
  # (only used for the all-included build) and reading in a font from
  # raw bytes passed over the wire (a typical way to load fonts).
  if (!skia_enable_fontmgr_empty) {
    deps += [ ":typeface_freetype" ]
    sources = [ "src/ports/SkFontMgr_custom_embedded.cpp" ]

    # If we haven't opted for no fonts (empty) or fonts, but not the
    # built-in one (custom), then, we need to provide the mechanism for
    # using the built-in font.
    if (!skia_enable_fontmgr_custom) {
      sources += [
        "src/ports/SkFontMgr_custom.cpp",
        "src/ports/SkFontMgr_custom.h",
        "src/ports/SkFontMgr_custom_embedded_factory.cpp",
      ]
    }
  }
}

optional("fontmgr_win") {
  enabled = skia_enable_fontmgr_win

  sources = [
    "src/fonts/SkFontMgr_indirect.cpp",
    "src/ports/SkFontMgr_win_dw.cpp",
    "src/ports/SkFontMgr_win_dw_factory.cpp",
    "src/ports/SkScalerContext_win_dw.cpp",
    "src/ports/SkTypeface_win_dw.cpp",
  ]
}

optional("fontmgr_win_gdi") {
  enabled = skia_enable_fontmgr_win_gdi

  sources = [ "src/ports/SkFontHost_win.cpp" ]
  libs = [ "Gdi32.lib" ]
}

if (skia_lex) {
  executable("sksllex") {
    sources = [
      "src/sksl/lex/Main.cpp",
      "src/sksl/lex/NFA.cpp",
      "src/sksl/lex/RegexNode.cpp",
      "src/sksl/lex/RegexParser.cpp",
    ]
    include_dirs = [ "." ]
  }

  action("run_sksllex") {
    script = "gn/run_sksllex.py"
    deps = [ ":sksllex(//gn/toolchain:$host_toolchain)" ]
    sources = [ "src/sksl/lex/sksl.lex" ]

    # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a
    # path that starts with target_out_dir and then uses ".." to back up into the src dir.
    outputs = [
      "$target_out_dir/" +
          rebase_path("src/sksl/lex/SkSLLexer.h", target_out_dir),
      # the script also modifies the corresponding .cpp file, but if we tell GN that it gets
      # confused due to the same file being named by two different paths
    ]
    sksllex_path = "$root_out_dir/"
    sksllex_path += "sksllex"
    if (host_os == "win") {
      sksllex_path += ".exe"
    }
    args = [
      rebase_path(sksllex_path),
      rebase_path("bin/clang-format"),
      rebase_path("src"),
    ]
  }
} else {
  group("run_sksllex") {
  }
}

if (skia_compile_processors) {
  executable("skslc") {
    defines = [ "SKSL_STANDALONE" ]
    sources = [ "src/sksl/SkSLMain.cpp" ]
    sources += skia_sksl_sources
    sources += skia_sksl_gpu_sources
    include_dirs = [ "." ]
    deps = [
      ":run_sksllex",
      "//third_party/spirv-tools:spvtools",
    ]
  }

  skia_gpu_processor_outputs = []
  foreach(src, skia_gpu_processor_sources) {
    dir = get_path_info(src, "dir")
    name = get_path_info(src, "name")

    # GN insists its outputs should go somewhere underneath target_out_dir, so we trick it with a
    # path that starts with target_out_dir and then uses ".." to back up into the src dir.
    skia_gpu_processor_outputs += [
      "$target_out_dir/" +
          rebase_path("$dir/generated/$name.h", target_out_dir),
      # the script also modifies the corresponding .cpp file, but if we tell GN that it gets
      # confused due to the same file being named by two different paths
    ]
  }

  action("create_sksl_enums") {
    script = "gn/create_sksl_enums.py"
    sources = [ "include/private/GrSharedEnums.h" ]
    outputs = [ "$target_out_dir/" +
                rebase_path("src/sksl/sksl_enums.inc", target_out_dir) ]
    args = [
      rebase_path(sources[0]),
      rebase_path(outputs[0]),
    ]
  }

  action("compile_processors") {
    script = "gn/compile_processors.py"
    deps = [
      ":create_sksl_enums",
      ":skslc(//gn/toolchain:$host_toolchain)",
    ]
    sources = skia_gpu_processor_sources
    outputs = skia_gpu_processor_outputs
    skslc_path = "$root_out_dir/"
    if (host_toolchain != default_toolchain_name) {
      skslc_path += "$host_toolchain/"
    }
    skslc_path += "skslc"
    if (host_os == "win") {
      skslc_path += ".exe"
    }
    args = [
      rebase_path(skslc_path),
      rebase_path("bin/clang-format"),
    ]
    args += rebase_path(skia_gpu_processor_sources)
  }
} else {
  skia_gpu_processor_outputs = []
  group("compile_processors") {
  }
}

optional("gpu") {
  enabled = skia_enable_gpu
  deps = [
    ":compile_processors",
    ":run_sksllex",
  ]
  if (skia_generate_workarounds) {
    deps += [ ":workaround_list" ]
  }
  public_defines = []
  public_configs = []
  public_deps = []

  sources =
      skia_gpu_sources + skia_sksl_gpu_sources + skia_gpu_processor_outputs
  if (!skia_enable_ccpr) {
    sources -= skia_ccpr_sources
    sources += [ "src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp" ]
  }
  if (!skia_enable_nvpr) {
    sources -= skia_nvpr_sources
    sources += [ "src/gpu/GrPathRendering_none.cpp" ]
  }

  libs = []

  if (skia_use_gl) {
    public_defines += [ "SK_GL" ]
    if (is_android) {
      sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ]

      # this lib is required to link against AHardwareBuffer
      if (defined(ndk_api) && ndk_api >= 26) {
        libs += [ "android" ]
      }
    } else if (skia_use_egl) {
      sources += [ "src/gpu/gl/egl/GrGLMakeNativeInterface_egl.cpp" ]
      libs += [ "EGL" ]
    } else if (is_linux && skia_use_x11) {
      sources += [ "src/gpu/gl/glx/GrGLMakeNativeInterface_glx.cpp" ]
      libs += [ "GL" ]
    } else if (is_mac) {
      sources += [ "src/gpu/gl/mac/GrGLMakeNativeInterface_mac.cpp" ]
    } else if (is_ios) {
      sources += [ "src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS.cpp" ]
    } else if (is_win) {
      sources += [ "src/gpu/gl/win/GrGLMakeNativeInterface_win.cpp" ]
      if (target_cpu != "arm64") {
        libs += [ "OpenGL32.lib" ]
      }
    } else {
      sources += [ "src/gpu/gl/GrGLMakeNativeInterface_none.cpp" ]
    }
    sources += skia_gl_gpu_sources
  }

  if (skia_use_vulkan) {
    public_defines += [ "SK_VULKAN" ]
    if (skia_use_vma) {
      deps += [ "third_party/vulkanmemoryallocator" ]
    }
    sources += skia_vk_sources
    if (skia_enable_vulkan_debug_layers) {
      public_defines += [ "SK_ENABLE_VK_LAYERS" ]
    }
    if (is_fuchsia) {
      if (using_fuchsia_sdk) {
        public_deps += [ "$fuchsia_sdk_root/pkg:vulkan" ]
      } else {
        public_deps += [ "//src/graphics/lib/vulkan" ]
      }
    }
  }

  if (is_android && (skia_use_gl || skia_use_vulkan)) {
    # this lib is required to link against AHardwareBuffer
    if (defined(ndk_api) && ndk_api >= 26) {
      libs += [ "android" ]
    }
  }

  if (skia_use_dawn) {
    public_defines += [ "SK_DAWN" ]
    sources += skia_dawn_sources
    public_deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ]
    deps += [
      "//third_party/externals/dawn/src/dawn:dawn_proc",
      "//third_party/externals/dawn/src/dawn:dawncpp",
      "//third_party/externals/dawn/src/dawn_native",
    ]
    if (dawn_enable_d3d12) {
      libs += [
        "d3d12.lib",
        "dxgi.lib",
        "d3dcompiler.lib",
      ]
    } else if (dawn_enable_metal) {
      libs += [ "Metal.framework" ]
    }
  }

  if (skia_use_direct3d) {
    public_defines += [ "SK_DIRECT3D" ]
    deps += [ "//third_party/spirv-cross:spirv_cross" ]
    sources += skia_direct3d_sources
    if (skia_enable_direct3d_debug_layer) {
      public_defines += [ "SK_ENABLE_D3D_DEBUG_LAYER" ]
    }
    libs += [
      "d3d12.lib",
      "dxgi.lib",
      "d3dcompiler.lib",
    ]
  }

  cflags_objcc = []
  if (skia_use_metal) {
    public_defines += [ "SK_METAL" ]
    sources += skia_metal_sources
    libs += [ "Metal.framework" ]
    libs += [ "MetalKit.framework" ]
    libs += [ "Foundation.framework" ]
    cflags_objcc += [ "-fobjc-arc" ]
  }

  if (skia_enable_atlas_text) {
    sources += skia_atlas_text_sources
  }

  if (is_debug) {
    public_defines += [ "SK_ENABLE_DUMP_GPU" ]
  }
}

optional("gif") {
  enabled = !skia_use_wuffs && skia_use_libgifcodec
  _libgifcodec_gni_path = "third_party/externals/libgifcodec/libgifcodec.gni"
  if ("True" ==
      exec_script("gn/checkpath.py",
                  [ rebase_path(_libgifcodec_gni_path, root_build_dir) ],
                  "trim string")) {
    public_defines = [ "SK_USE_LIBGIFCODEC" ]
    public_include_dirs = [
      ".",
      skia_libgifcodec_path,
    ]
    include_dirs = public_include_dirs
    import(_libgifcodec_gni_path)
    sources = rebase_path(libgifcodec_sources + libgifcodec_public,
                          ".",
                          skia_libgifcodec_path)
  }
}

optional("heif") {
  enabled = skia_use_libheif
  public_defines = [ "SK_HAS_HEIF_LIBRARY" ]

  deps = []

  sources = [ "src/codec/SkHeifCodec.cpp" ]
}

optional("jpeg_decode") {
  enabled = skia_use_libjpeg_turbo_decode
  public_defines = [ "SK_CODEC_DECODES_JPEG" ]

  deps = [ "//third_party/libjpeg-turbo:libjpeg" ]
  sources = [
    "src/codec/SkJpegCodec.cpp",
    "src/codec/SkJpegDecoderMgr.cpp",
    "src/codec/SkJpegUtility.cpp",
  ]
}

optional("jpeg_encode") {
  enabled = skia_use_libjpeg_turbo_encode
  public_defines = [ "SK_ENCODE_JPEG" ]

  deps = [ "//third_party/libjpeg-turbo:libjpeg" ]
  public = [ "include/encode/SkJpegEncoder.h" ]
  sources = [
    "src/images/SkJPEGWriteUtility.cpp",
    "src/images/SkJpegEncoder.cpp",
  ]
}

optional("pdf") {
  enabled = skia_use_zlib && skia_enable_pdf
  public_defines = [ "SK_SUPPORT_PDF" ]

  deps = [ "//third_party/zlib" ]
  if (skia_use_libjpeg_turbo_decode) {
    deps += [ ":jpeg_decode" ]
  }
  if (skia_use_libjpeg_turbo_encode) {
    deps += [ ":jpeg_encode" ]
  }
  public = skia_pdf_public
  sources = skia_pdf_sources
  sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]
  if (skia_use_icu && skia_use_harfbuzz && skia_pdf_subset_harfbuzz) {
    deps += [ "//third_party/harfbuzz" ]
    defines = [ "SK_PDF_USE_HARFBUZZ_SUBSET" ]
  } else if (skia_use_icu && skia_use_sfntly) {
    deps += [ "//third_party/sfntly" ]
    defines = [ "SK_PDF_USE_SFNTLY" ]
  }
}

optional("xps") {
  enabled = skia_use_xps && is_win
  public_defines = [ "SK_SUPPORT_XPS" ]
  public = skia_xps_public
  sources = skia_xps_sources
}

optional("png_decode") {
  enabled = skia_use_libpng_decode
  public_defines = [ "SK_CODEC_DECODES_PNG" ]

  deps = [ "//third_party/libpng" ]
  sources = [
    "src/codec/SkIcoCodec.cpp",
    "src/codec/SkPngCodec.cpp",
  ]
}

optional("png_encode") {
  enabled = skia_use_libpng_encode
  public_defines = [ "SK_ENCODE_PNG" ]

  deps = [ "//third_party/libpng" ]
  sources = [ "src/images/SkPngEncoder.cpp" ]
}

optional("raw") {
  enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo_decode && skia_use_piex
  public_defines = [ "SK_CODEC_DECODES_RAW" ]

  deps = [
    "//third_party/dng_sdk",
    "//third_party/libjpeg-turbo:libjpeg",
    "//third_party/piex",
  ]

  # SkRawCodec catches any exceptions thrown by dng_sdk, insulating the rest of
  # Skia.
  configs_to_remove = [ "//gn:no_exceptions" ]

  sources = [ "src/codec/SkRawCodec.cpp" ]
}

import("third_party/skcms/skcms.gni")
source_set("skcms") {
  cflags = []
  if (!is_win || is_clang) {
    cflags += [
      "-w",
      "-std=c11",
    ]
  }

  public = [ "include/third_party/skcms/skcms.h" ]
  include_dirs = [ "include/third_party/skcms" ]
  sources = rebase_path(skcms_sources, ".", "third_party/skcms")
}

optional("typeface_freetype") {
  enabled = skia_use_freetype

  deps = [ "//third_party/freetype2" ]
  sources = [
    "src/ports/SkFontHost_FreeType.cpp",
    "src/ports/SkFontHost_FreeType_common.cpp",
  ]
}

optional("webp_decode") {
  enabled = skia_use_libwebp_decode
  public_defines = [ "SK_CODEC_DECODES_WEBP" ]

  deps = [ "//third_party/libwebp" ]
  sources = [ "src/codec/SkWebpCodec.cpp" ]
}

optional("webp_encode") {
  enabled = skia_use_libwebp_encode
  public_defines = [ "SK_ENCODE_WEBP" ]

  deps = [ "//third_party/libwebp" ]
  sources = [ "src/images/SkWebpEncoder.cpp" ]
}

optional("wuffs") {
  enabled = skia_use_wuffs
  public_defines = [ "SK_HAS_WUFFS_LIBRARY" ]

  deps = [ "//third_party/wuffs" ]
  sources = [ "src/codec/SkWuffsCodec.cpp" ]
}

optional("xml") {
  enabled = skia_use_expat
  public_defines = [ "SK_XML" ]

  deps = [ "//third_party/expat" ]
  sources = [
    "src/svg/SkSVGCanvas.cpp",
    "src/svg/SkSVGDevice.cpp",
    "src/xml/SkDOM.cpp",
    "src/xml/SkXMLParser.cpp",
    "src/xml/SkXMLWriter.cpp",
  ]
}

optional("sksl_interpreter") {
  enabled = skia_enable_sksl_interpreter
  public_defines = [ "SK_ENABLE_SKSL_INTERPRETER" ]
}

optional("skvm_jit") {
  enabled = skia_enable_skvm_jit
  public_defines = [ "SKVM_JIT" ]
}

if (skia_enable_gpu && skia_generate_workarounds) {
  action("workaround_list") {
    script = "tools/build_workaround_header.py"

    inputs = [ "src/gpu/gpu_workaround_list.txt" ]

    # see comments in skia_compile_processors about out dir path shenanigans.
    output_file =
        rebase_path("include/gpu/GrDriverBugWorkaroundsAutogen.h", root_out_dir)

    outputs = [ "$root_out_dir/$output_file" ]
    args = [
      "--output-file",
      "$output_file",
    ]

    foreach(file, inputs) {
      args += [ rebase_path(file, root_build_dir) ]
    }
  }
}

component("skia") {
  public_configs = [ ":skia_public" ]
  configs += skia_library_configs

  public_deps = [
    ":gpu",
    ":pdf",
    ":skcms",
    ":xps",
  ]

  deps = [
    ":android_utils",
    ":arm64",
    ":armv7",
    ":avx",
    ":compile_processors",
    ":crc32",
    ":fontmgr_android",
    ":fontmgr_custom",
    ":fontmgr_custom_empty",
    ":fontmgr_empty",
    ":fontmgr_fontconfig",
    ":fontmgr_fuchsia",
    ":fontmgr_wasm",
    ":fontmgr_win",
    ":fontmgr_win_gdi",
    ":gif",
    ":heif",
    ":hsw",
    ":jpeg_decode",
    ":jpeg_encode",
    ":none",
    ":png_decode",
    ":png_encode",
    ":raw",
    ":sksl_interpreter",
    ":skvm_jit",
    ":sse2",
    ":sse41",
    ":sse42",
    ":ssse3",
    ":webp_decode",
    ":webp_encode",
    ":wuffs",
    ":xml",
  ]

  # This file (and all GN files in Skia) are designed to work with an
  # empty sources assignment filter; we handle all that explicitly.
  # We clear the filter here for clients who may have set up a global filter.
  set_sources_assignment_filter([])

  public = skia_core_public
  public += skia_utils_public
  public += skia_effects_public
  public += skia_effects_imagefilter_public

  sources = []
  sources += skia_core_sources
  sources += skia_utils_sources
  sources += skia_effects_sources
  sources += skia_effects_imagefilter_sources
  sources += skia_sksl_sources
  sources += [
    "src/android/SkAndroidFrameworkUtils.cpp",
    "src/android/SkAnimatedImage.cpp",
    "src/android/SkBitmapRegionCodec.cpp",
    "src/android/SkBitmapRegionDecoder.cpp",
    "src/codec/SkAndroidCodec.cpp",
    "src/codec/SkAndroidCodecAdapter.cpp",
    "src/codec/SkBmpBaseCodec.cpp",
    "src/codec/SkBmpCodec.cpp",
    "src/codec/SkBmpMaskCodec.cpp",
    "src/codec/SkBmpRLECodec.cpp",
    "src/codec/SkBmpStandardCodec.cpp",
    "src/codec/SkCodec.cpp",
    "src/codec/SkCodecImageGenerator.cpp",
    "src/codec/SkColorTable.cpp",
    "src/codec/SkEncodedInfo.cpp",
    "src/codec/SkMaskSwizzler.cpp",
    "src/codec/SkMasks.cpp",
    "src/codec/SkParseEncodedOrigin.cpp",
    "src/codec/SkSampledCodec.cpp",
    "src/codec/SkSampler.cpp",
    "src/codec/SkStreamBuffer.cpp",
    "src/codec/SkSwizzler.cpp",
    "src/codec/SkWbmpCodec.cpp",
    "src/images/SkImageEncoder.cpp",
    "src/ports/SkDiscardableMemory_none.cpp",
    "src/ports/SkGlobalInitialization_default.cpp",
    "src/ports/SkImageGenerator_skia.cpp",
    "src/ports/SkMemory_malloc.cpp",
    "src/ports/SkOSFile_stdio.cpp",
    "src/sfnt/SkOTTable_name.cpp",
    "src/sfnt/SkOTUtils.cpp",
  ]

  defines = []
  libs = []

  if (is_win) {
    sources += [
      "src/ports/SkDebug_win.cpp",
      "src/ports/SkImageEncoder_WIC.cpp",
      "src/ports/SkImageGeneratorWIC.cpp",
      "src/ports/SkOSFile_win.cpp",
      "src/ports/SkOSLibrary_win.cpp",
    ]
    libs += [
      "FontSub.lib",
      "Ole32.lib",
      "OleAut32.lib",
      "User32.lib",
      "Usp10.lib",
    ]
  } else {
    sources += [
      "src/ports/SkOSFile_posix.cpp",
      "src/ports/SkOSLibrary_posix.cpp",
    ]
    libs += [ "dl" ]
  }

  if (is_android) {
    deps += [ "//third_party/expat" ]
    if (defined(ndk) && ndk != "") {
      deps += [ "//third_party/cpu-features" ]
    }
    sources += [ "src/ports/SkDebug_android.cpp" ]
    libs += [
      "EGL",
      "GLESv2",
      "log",
    ]
  }

  if (is_linux || target_cpu == "wasm") {
    sources += [ "src/ports/SkDebug_stdio.cpp" ]
    if (skia_use_egl) {
      libs += [ "GLESv2" ]
    }
  }

  if (skia_use_fonthost_mac) {
    sources += [ "src/ports/SkFontHost_mac.cpp" ]
  }

  if (is_mac) {
    sources += [
      "src/ports/SkDebug_stdio.cpp",
      "src/ports/SkImageEncoder_CG.cpp",
      "src/ports/SkImageGeneratorCG.cpp",
    ]
    libs += [
      # AppKit symbols NSFontWeightXXX may be dlsym'ed.
      "AppKit.framework",
      "ApplicationServices.framework",
      "OpenGL.framework",
    ]
  }

  if (is_ios) {
    sources += [
      "src/ports/SkDebug_stdio.cpp",
      "src/ports/SkFontHost_mac.cpp",
      "src/ports/SkImageEncoder_CG.cpp",
      "src/ports/SkImageGeneratorCG.cpp",
    ]
    libs += [
      "CoreFoundation.framework",
      "CoreGraphics.framework",
      "CoreText.framework",
      "ImageIO.framework",
      "MobileCoreServices.framework",

      # UIKit symbols UIFontWeightXXX may be dlsym'ed.
      "UIKit.framework",
    ]
  }

  if (is_fuchsia) {
    sources += [ "src/ports/SkDebug_stdio.cpp" ]
  }

  if (skia_enable_spirv_validation) {
    deps += [ "//third_party/spirv-tools:spvtools_val" ]
    defines += [ "SK_ENABLE_SPIRV_VALIDATION" ]
  }

  if (skia_include_multiframe_procs) {
    sources += [ "tools/SkSharingProc.cpp" ]
  }
}

# DebugCanvas used in experimental/wasm-skp-debugger
if (target_cpu == "wasm") {
  static_library("debugcanvas") {
    public_configs = [ ":skia_public" ]

    sources = [
      "tools/SkSharingProc.cpp",
      "tools/UrlDataManager.cpp",
      "tools/debugger/DebugCanvas.cpp",
      "tools/debugger/DebugLayerManager.cpp",
      "tools/debugger/DrawCommand.cpp",
      "tools/debugger/JsonWriteBuffer.cpp",
    ]

    deps = [ ":fontmgr_wasm" ]
  }
}

static_library("pathkit") {
  check_includes = false
  public_configs = [ ":skia_public" ]
  configs += skia_library_configs

  deps = [
    ":arm64",
    ":armv7",
    ":avx",
    ":crc32",
    ":hsw",
    ":none",
    ":sse2",
    ":sse41",
    ":sse42",
    ":ssse3",
  ]

  # This file (and all GN files in Skia) are designed to work with an
  # empty sources assignment filter; we handle all that explicitly.
  # We clear the filter here for clients who may have set up a global filter.
  set_sources_assignment_filter([])

  sources = []
  sources += skia_pathops_sources
  sources += skia_pathops_public
  sources += [
    "src/core/SkAnalyticEdge.cpp",
    "src/core/SkArenaAlloc.cpp",
    "src/core/SkContourMeasure.cpp",
    "src/core/SkCubicMap.cpp",
    "src/core/SkEdge.cpp",
    "src/core/SkEdgeBuilder.cpp",
    "src/core/SkEdgeClipper.cpp",
    "src/core/SkGeometry.cpp",
    "src/core/SkIDChangeListener.cpp",
    "src/core/SkLineClipper.cpp",
    "src/core/SkMalloc.cpp",
    "src/core/SkMallocPixelRef.cpp",
    "src/core/SkMath.cpp",
    "src/core/SkMatrix.cpp",
    "src/core/SkOpts.cpp",
    "src/core/SkPaint.cpp",
    "src/core/SkPath.cpp",
    "src/core/SkPathEffect.cpp",
    "src/core/SkPathMeasure.cpp",
    "src/core/SkPathRef.cpp",
    "src/core/SkPoint.cpp",
    "src/core/SkRRect.cpp",
    "src/core/SkRect.cpp",
    "src/core/SkSemaphore.cpp",
    "src/core/SkStream.cpp",
    "src/core/SkString.cpp",
    "src/core/SkStringUtils.cpp",
    "src/core/SkStroke.cpp",
    "src/core/SkStrokeRec.cpp",
    "src/core/SkStrokerPriv.cpp",
    "src/core/SkThreadID.cpp",
    "src/core/SkUtils.cpp",
    "src/effects/SkDashPathEffect.cpp",
    "src/effects/SkTrimPathEffect.cpp",
    "src/ports/SkDebug_stdio.cpp",
    "src/ports/SkMemory_malloc.cpp",
    "src/utils/SkDashPath.cpp",
    "src/utils/SkParse.cpp",
    "src/utils/SkParsePath.cpp",
    "src/utils/SkUTF.cpp",
  ]
}

group("modules") {
  deps = [
    "modules/particles",
    "modules/skottie",
    "modules/skshaper",
  ]
  if (target_cpu == "wasm") {
    deps += [ "modules/skparagraph" ]
  }
}

# Targets guarded by skia_enable_tools may use //third_party freely.
if (skia_enable_tools) {
  skia_public_includes = [
    "client_utils/android",
    "include/android",
    "include/atlastext",
    "include/c",
    "include/codec",
    "include/config",
    "include/core",
    "include/docs",
    "include/effects",
    "include/encode",
    "include/gpu",
    "include/pathops",
    "include/ports",
    "include/svg",
    "include/utils",
    "include/utils/mac",
    "modules/skshaper/include",
    "modules/skottie/include",
  ]

  # Used by gn_to_bp.py to list our public include dirs.
  source_set("public") {
    configs += [ ":skia_public" ]
    include_dirs = skia_public_includes
  }

  config("skia.h_config") {
    include_dirs = [ "$target_gen_dir" ]
  }
  action("skia.h") {
    public_configs = [ ":skia.h_config" ]
    skia_h = "$target_gen_dir/skia.h"
    script = "gn/find_headers.py"

    args = [ rebase_path("//bin/gn") ] + [ rebase_path("//") ] +
           [ rebase_path(skia_h, root_build_dir) ] +
           rebase_path(skia_public_includes)
    depfile = "$skia_h.deps"
    outputs = [ skia_h ]
  }

  if (target_cpu == "x64") {
    executable("fiddle") {
      check_includes = false
      libs = []
      sources = [
        "tools/fiddle/draw.cpp",
        "tools/fiddle/fiddle_main.cpp",
      ]

      if (skia_use_egl) {
        sources += [ "tools/fiddle/egl_context.cpp" ]
      } else {
        sources += [ "tools/fiddle/null_context.cpp" ]
      }
      testonly = true
      deps = [
        ":flags",
        ":gpu_tool_utils",
        ":skia",
        ":skia.h",
        "modules/skottie",
        "modules/skshaper",
      ]
    }
  }

  config("our_vulkan_headers") {
    include_dirs = [ "include/third_party/vulkan" ]
  }

  source_set("public_headers_warnings_check") {
    sources = [ "tools/public_headers_warnings_check.cpp" ]
    configs -= [ "//gn:warnings_except_public_headers" ]
    configs += [ ":our_vulkan_headers" ]
    deps = [
      ":skia",
      ":skia.h",
      "modules/skottie",
      "modules/skshaper",
    ]

    if (skia_use_dawn) {
      deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ]
    }
  }

  template("test_lib") {
    config(target_name + "_config") {
      if (defined(invoker.public_defines)) {
        defines = invoker.public_defines
      }
    }
    source_set(target_name) {
      forward_variables_from(invoker, "*", [])
      check_includes = false
      public_configs = [
        ":" + target_name + "_config",
        ":skia_private",
      ]

      if (!defined(deps)) {
        deps = []
      }
      deps += [ ":skia" ]
      testonly = true
    }
  }

  template("test_app") {
    if (is_ios) {
      ios_app_bundle(target_name) {
        forward_variables_from(invoker,
                               "*",
                               [
                                 "output_name",
                                 "visibility",
                                 "is_shared_library",
                               ])
        testonly = true
        extra_configs = [ ":skia_private" ]
        launchscreen = "platform_tools/ios/app/LaunchScreen.storyboard"
        data_sources = [ "resources" ]
        if ("True" == exec_script("//gn/checkdir.py",
                                  [ rebase_path("skps", root_build_dir) ],
                                  "trim string")) {
          data_sources += [ "skps" ]
        }
      }
    } else {
      # !is_ios

      output_dir = root_build_dir
      if (defined(invoker.is_shared_library) && invoker.is_shared_library) {
        shared_library("lib" + target_name) {
          forward_variables_from(invoker, "*", [ "is_shared_library" ])
          configs += [ ":skia_private" ]
          testonly = true
        }
      } else {
        _executable = target_name
        executable(_executable) {
          check_includes = false
          forward_variables_from(invoker, "*", [ "is_shared_library" ])
          configs += [ ":skia_private" ]
          testonly = true
        }
      }
      if (is_android && skia_android_serial != "" && defined(_executable)) {
        action("push_" + target_name) {
          script = "gn/push_to_android.py"
          deps = [ ":" + _executable ]
          _stamp = "$target_gen_dir/$_executable.pushed_$skia_android_serial"
          outputs = [ _stamp ]
          args = [
            rebase_path("$root_build_dir/$_executable"),
            skia_android_serial,
            rebase_path(_stamp),
          ]
          testonly = true
        }
      }
    }
  }

  test_lib("gpu_tool_utils") {
    public_defines = []

    # Bots and even devs may not have Vulkan headers, so put
    # include/third_party/vulkan on our path so they're always available.
    all_dependent_configs = [ ":our_vulkan_headers" ]

    defines = []
    if (skia_enable_discrete_gpu) {
      defines += [ "SK_ENABLE_DISCRETE_GPU" ]
    }

    deps = []
    public_deps = []
    sources = [
      "tools/gpu/GrContextFactory.cpp",
      "tools/gpu/GrTest.cpp",
      "tools/gpu/MemoryCache.cpp",
      "tools/gpu/MemoryCache.h",
      "tools/gpu/ProxyUtils.cpp",
      "tools/gpu/TestContext.cpp",
      "tools/gpu/TestOps.cpp",
      "tools/gpu/TestOps.h",
      "tools/gpu/YUVUtils.cpp",
      "tools/gpu/YUVUtils.h",
      "tools/gpu/gl/GLTestContext.cpp",  # See comment below about
                                         # GrContextFactory workaround.
      "tools/gpu/mock/MockTestContext.cpp",
    ]

    libs = []

    if (skia_use_gl) {
      sources += [
        "tools/gpu/atlastext/GLTestAtlasTextRenderer.cpp",
        "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
      ]
      if (is_ios) {
        sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
        libs += [ "OpenGLES.framework" ]
      } else if (is_mac) {
        sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
      }
      if (skia_use_angle) {
        deps += [ "//third_party/angle2" ]
        sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
      }
    }

    # We need the GLTestContext on Vulkan-only builds for the persistent GL context workaround in
    # in GrContextFactory. This only matters for OSes that can run Vulkan.
    if ((skia_use_gl || skia_use_vulkan) && target_cpu != "wasm") {
      if (is_android || skia_use_egl) {
        sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
        libs += [ "EGL" ]
      } else if (is_linux) {
        sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
        libs += [
          "GLU",
          "GL",
          "X11",
        ]
      } else if (is_win) {
        sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ]
        libs += [ "Gdi32.lib" ]
        if (target_cpu != "arm64") {
          libs += [ "OpenGL32.lib" ]
        }
      }
    }

    if (skia_use_vulkan) {
      sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
      sources += [ "tools/gpu/vk/VkTestUtils.cpp" ]
    }
    if (skia_use_metal) {
      sources += [ "tools/gpu/mtl/MtlTestContext.mm" ]
    }
    if (skia_use_direct3d) {
      sources += [ "tools/gpu/d3d/D3DTestContext.cpp" ]
      sources += [ "tools/gpu/d3d/D3DTestUtils.cpp" ]
    }
    if (skia_use_dawn) {
      public_deps += [ "//third_party/externals/dawn/src/dawn:dawn_headers" ]
      sources += [ "tools/gpu/dawn/DawnTestContext.cpp" ]
      cflags_cc = [ "-Wno-microsoft-cast" ]
    }

    if (is_fuchsia && using_fuchsia_sdk) {
      libs +=
          [ "${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/lib/libzircon.so" ]
    }

    cflags_objcc = [ "-fobjc-arc" ]
  }  # test_lib("gpu_tool_utils")

  test_lib("flags") {
    sources = [ "tools/flags/CommandLineFlags.cpp" ]
  }

  test_lib("common_flags_config") {
    sources = [ "tools/flags/CommonFlagsConfig.cpp" ]
    deps = [ ":flags" ]
    public_deps = [ ":gpu_tool_utils" ]
  }
  test_lib("common_flags_gpu") {
    sources = [ "tools/flags/CommonFlagsGpu.cpp" ]
    deps = [ ":flags" ]
    public_deps = [ ":gpu_tool_utils" ]
  }
  test_lib("common_flags_images") {
    sources = [ "tools/flags/CommonFlagsImages.cpp" ]
    deps = [ ":flags" ]
  }
  test_lib("common_flags_aa") {
    sources = [ "tools/flags/CommonFlagsAA.cpp" ]
    deps = [ ":flags" ]
  }

  test_lib("trace") {
    deps = [ ":flags" ]
    sources = [
      "tools/trace/ChromeTracingTracer.cpp",
      "tools/trace/ChromeTracingTracer.h",
      "tools/trace/EventTracingPriv.cpp",
      "tools/trace/EventTracingPriv.h",
      "tools/trace/SkDebugfTracer.cpp",
      "tools/trace/SkDebugfTracer.h",
    ]
  }

  test_lib("tool_utils") {
    sources = [
      "tools/AndroidSkDebugToStdOut.cpp",
      "tools/AutoreleasePool.h",
      "tools/DDLPromiseImageHelper.cpp",
      "tools/DDLTileHelper.cpp",
      "tools/LsanSuppressions.cpp",
      "tools/ProcStats.cpp",
      "tools/Resources.cpp",
      "tools/SkMetaData.cpp",
      "tools/SkMetaData.h",
      "tools/SkSharingProc.cpp",
      "tools/ToolUtils.cpp",
      "tools/UrlDataManager.cpp",
      "tools/debugger/DebugCanvas.cpp",
      "tools/debugger/DebugLayerManager.cpp",
      "tools/debugger/DrawCommand.cpp",
      "tools/debugger/JsonWriteBuffer.cpp",
      "tools/fonts/RandomScalerContext.cpp",
      "tools/fonts/TestEmptyTypeface.h",
      "tools/fonts/TestFontMgr.cpp",
      "tools/fonts/TestFontMgr.h",
      "tools/fonts/TestSVGTypeface.cpp",
      "tools/fonts/TestSVGTypeface.h",
      "tools/fonts/TestTypeface.cpp",
      "tools/fonts/TestTypeface.h",
      "tools/fonts/ToolUtilsFont.cpp",
      "tools/random_parse_path.cpp",
      "tools/timer/TimeUtils.h",
      "tools/timer/Timer.cpp",
    ]
    if (target_cpu != "wasm") {
      sources += [ "tools/CrashHandler.cpp" ]
    }
    libs = []
    if (is_ios) {
      sources += [ "tools/ios_utils.m" ]
      sources += [ "tools/ios_utils.h" ]
      if (skia_use_metal) {
        sources += [ "tools/AutoreleasePool.mm" ]
      }
      libs += [ "Foundation.framework" ]
    } else if (is_mac) {
      if (skia_use_metal) {
        sources += [ "tools/AutoreleasePool.mm" ]
        libs += [ "Foundation.framework" ]
      }
    } else if (is_win) {
      libs += [ "DbgHelp.lib" ]
    }

    defines = []
    if (skia_tools_require_resources) {
      defines += [ "SK_TOOLS_REQUIRE_RESOURCES" ]
    }
    deps = [
      ":experimental_svg_model",
      ":flags",
    ]
    public_deps = [ ":gpu_tool_utils" ]
  }

  test_lib("etc1") {
    sources = [ "third_party/etc1/etc1.cpp" ]
  }

  import("gn/gm.gni")
  test_lib("gm") {
    sources = gm_sources
    if (skia_use_gl) {
      sources += gl_gm_sources
    }
    deps = [
      ":etc1",
      ":flags",
      ":skia",
      ":tool_utils",
      "modules/skottie",
      "modules/skottie:gm",
      "modules/skshaper",
    ]
    if (is_skia_dev_build) {
      sources += [ "gm/fiddle.cpp" ]
      deps += [ ":skia.h" ]
    }
    public_deps = [ ":gpu_tool_utils" ]

    if (skia_use_ffmpeg) {
      deps += [ "experimental/ffmpeg:video_decoder" ]
      sources += [ "gm/video_decoder.cpp" ]
    }
  }

  test_lib("skvm_builders") {
    sources = [
      "tools/SkVMBuilders.cpp",
      "tools/SkVMBuilders.h",
    ]
  }

  import("gn/tests.gni")
  test_lib("tests") {
    sources = tests_sources + pathops_tests_sources
    if (skia_use_metal) {
      sources += metal_tests_sources
      cflags_objcc = [ "-fobjc-arc" ]
    }
    if (skia_use_gl) {
      sources += gl_tests_sources
    }
    if (!skia_enable_fontmgr_android) {
      sources -= [ "//tests/FontMgrAndroidParserTest.cpp" ]
    }
    if (!(skia_use_freetype && skia_use_fontconfig)) {
      sources -= [ "//tests/FontMgrFontConfigTest.cpp" ]
    }
    deps = [
      ":experimental_svg_model",
      ":flags",
      ":skia",
      ":skvm_builders",
      ":tool_utils",
      "modules/skottie:tests",
      "modules/skparagraph:tests",
      "modules/sksg:tests",
      "modules/skshaper",
      "//third_party/libpng",
      "//third_party/libwebp",
      "//third_party/zlib",
    ]
    public_deps = [
      ":gpu_tool_utils",  # Test.h #includes headers from this target.
    ]
  }

  import("gn/bench.gni")
  test_lib("bench") {
    sources = bench_sources
    deps = [
      ":flags",
      ":gm",
      ":gpu_tool_utils",
      ":skia",
      ":skvm_builders",
      ":tool_utils",
      "modules/skparagraph:bench",
      "modules/skshaper",
    ]
  }

  test_lib("experimental_svg_model") {
    if (skia_use_expat) {
      sources = [
        "experimental/svg/model/SkSVGAttribute.cpp",
        "experimental/svg/model/SkSVGAttributeParser.cpp",
        "experimental/svg/model/SkSVGCircle.cpp",
        "experimental/svg/model/SkSVGClipPath.cpp",
        "experimental/svg/model/SkSVGContainer.cpp",
        "experimental/svg/model/SkSVGDOM.cpp",
        "experimental/svg/model/SkSVGEllipse.cpp",
        "experimental/svg/model/SkSVGGradient.cpp",
        "experimental/svg/model/SkSVGLine.cpp",
        "experimental/svg/model/SkSVGLinearGradient.cpp",
        "experimental/svg/model/SkSVGNode.cpp",
        "experimental/svg/model/SkSVGPath.cpp",
        "experimental/svg/model/SkSVGPattern.cpp",
        "experimental/svg/model/SkSVGPoly.cpp",
        "experimental/svg/model/SkSVGRadialGradient.cpp",
        "experimental/svg/model/SkSVGRect.cpp",
        "experimental/svg/model/SkSVGRenderContext.cpp",
        "experimental/svg/model/SkSVGSVG.cpp",
        "experimental/svg/model/SkSVGShape.cpp",
        "experimental/svg/model/SkSVGStop.cpp",
        "experimental/svg/model/SkSVGText.cpp",
        "experimental/svg/model/SkSVGTransformableNode.cpp",
        "experimental/svg/model/SkSVGUse.cpp",
        "experimental/svg/model/SkSVGValue.cpp",
      ]
      deps = [
        ":skia",
        ":xml",
      ]
    }
  }

  test_lib("experimental_xform") {
    sources = [
      "experimental/xform/SkShape.cpp",
      "experimental/xform/SkXform.cpp",
      "experimental/xform/XContext.cpp",
    ]
    deps = [ ":skia" ]
  }

  if (skia_use_lua) {
    test_lib("lua") {
      sources = [
        "src/utils/SkLua.cpp",
        "src/utils/SkLuaCanvas.cpp",
      ]
      deps = [
        "modules/skshaper",
        "//third_party/lua",
      ]
    }

    test_app("lua_app") {
      sources = [ "tools/lua/lua_app.cpp" ]
      deps = [
        ":lua",
        ":skia",
        "//third_party/lua",
      ]
    }

    test_app("lua_pictures") {
      sources = [ "tools/lua/lua_pictures.cpp" ]
      deps = [
        ":flags",
        ":lua",
        ":skia",
        ":tool_utils",
        "//third_party/lua",
      ]
    }
  }

  if (is_linux || is_mac) {
    test_app("skottie_tool") {
      deps = [ "modules/skottie:tool" ]
    }
  }

  test_app("make_skqp_model") {
    sources = [ "tools/skqp/make_skqp_model.cpp" ]
    deps = [ ":skia" ]
  }

  import("gn/samples.gni")
  test_lib("samples") {
    sources = samples_sources
    if (skia_enable_ccpr) {
      sources += samples_sources_ccpr
    }
    public_deps = [ ":tool_utils" ]
    deps = [
      ":experimental_svg_model",
      ":flags",
      ":gpu_tool_utils",
      ":xml",
      "modules/skparagraph:samples",
      "modules/skshaper",
    ]

    if (skia_use_lua) {
      sources += [ "samplecode/SampleLua.cpp" ]
      deps += [
        ":lua",
        "//third_party/lua",
      ]
    }
  }
  if (target_cpu != "wasm") {
    test_app("imgcvt") {
      sources = [ "tools/imgcvt.cpp" ]
      deps = [
        ":skcms",
        ":skia",
      ]
    }
    test_lib("hash_and_encode") {
      sources = [
        "tools/HashAndEncode.cpp",
        "tools/HashAndEncode.h",
      ]
      deps = [
        ":flags",
        ":skia",
        "//third_party/libpng",
      ]
    }
    test_app("fm") {
      sources = [
        "dm/DMGpuTestProcs.cpp",  # blech
        "tools/fm/fm.cpp",
      ]
      deps = [
        ":common_flags_aa",
        ":common_flags_gpu",
        ":experimental_svg_model",
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":hash_and_encode",
        ":skia",
        ":tests",
        ":tool_utils",
        ":trace",
        "modules/skottie",
        "modules/skottie:utils",
      ]
    }
    test_app("dm") {
      sources = [
        "dm/DM.cpp",
        "dm/DMGpuTestProcs.cpp",
        "dm/DMJsonWriter.cpp",
        "dm/DMSrcSink.cpp",
      ]
      deps = [
        ":common_flags_aa",
        ":common_flags_config",
        ":common_flags_gpu",
        ":common_flags_images",
        ":experimental_svg_model",
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":hash_and_encode",
        ":skia",
        ":tests",
        ":tool_utils",
        ":trace",
        "modules/skottie",
        "modules/skottie:utils",
      ]
    }
  }

  if (!is_win) {
    test_app("remote_demo") {
      sources = [ "tools/remote_demo.cpp" ]
      deps = [ ":skia" ]
    }
  }

  if (!is_win) {
    test_app("blob_cache_sim") {
      sources = [ "tools/blob_cache_sim.cpp" ]
      deps = [ ":skia" ]
    }
  }

  test_app("nanobench") {
    sources = [ "bench/nanobench.cpp" ]
    deps = [
      ":bench",
      ":common_flags_aa",
      ":common_flags_config",
      ":common_flags_gpu",
      ":common_flags_images",
      ":experimental_svg_model",
      ":flags",
      ":gm",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
      ":trace",
      "modules/skparagraph:bench",
      "modules/skshaper",
    ]
  }

  test_app("skpinfo") {
    sources = [ "tools/skpinfo.cpp" ]
    deps = [
      ":flags",
      ":skia",
    ]
  }

  if (skia_use_ffmpeg) {
    test_app("skottie2movie") {
      sources = [ "tools/skottie2movie.cpp" ]
      deps = [
        ":flags",
        ":gpu_tool_utils",
        ":skia",
        "experimental/ffmpeg:video_encoder",
        "modules/skottie",
        "modules/skottie:utils",
      ]
    }
  }

  test_app("skpbench") {
    sources = [ "tools/skpbench/skpbench.cpp" ]
    deps = [
      ":common_flags_config",
      ":common_flags_gpu",
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
    ]
  }

  test_app("sktexttopdf") {
    sources = [ "tools/using_skia_and_harfbuzz.cpp" ]
    deps = [
      ":skia",
      "modules/skshaper",
    ]
  }

  test_app("create_test_font") {
    sources = [ "tools/fonts/create_test_font.cpp" ]
    deps = [ ":skia" ]
    assert_no_deps = [
      # tool_utils requires the output of this app.
      ":tool_utils",
    ]
  }

  if (skia_use_expat) {
    test_app("create_test_font_color") {
      sources = [ "tools/fonts/create_test_font_color.cpp" ]
      deps = [
        ":flags",
        ":skia",
        ":tool_utils",
      ]
    }
  }

  test_app("get_images_from_skps") {
    sources = [ "tools/get_images_from_skps.cpp" ]
    deps = [
      ":flags",
      ":skia",
    ]
  }

  if (!is_ios && target_cpu != "wasm" && !(is_win && target_cpu == "arm64")) {
    test_app("skiaserve") {
      sources = [
        "tools/skiaserve/Request.cpp",
        "tools/skiaserve/Response.cpp",
        "tools/skiaserve/skiaserve.cpp",
        "tools/skiaserve/urlhandlers/BreakHandler.cpp",
        "tools/skiaserve/urlhandlers/ClipAlphaHandler.cpp",
        "tools/skiaserve/urlhandlers/CmdHandler.cpp",
        "tools/skiaserve/urlhandlers/ColorModeHandler.cpp",
        "tools/skiaserve/urlhandlers/DataHandler.cpp",
        "tools/skiaserve/urlhandlers/DownloadHandler.cpp",
        "tools/skiaserve/urlhandlers/EnableGPUHandler.cpp",
        "tools/skiaserve/urlhandlers/ImgHandler.cpp",
        "tools/skiaserve/urlhandlers/InfoHandler.cpp",
        "tools/skiaserve/urlhandlers/OpBoundsHandler.cpp",
        "tools/skiaserve/urlhandlers/OpsHandler.cpp",
        "tools/skiaserve/urlhandlers/OverdrawHandler.cpp",
        "tools/skiaserve/urlhandlers/PostHandler.cpp",
        "tools/skiaserve/urlhandlers/QuitHandler.cpp",
        "tools/skiaserve/urlhandlers/RootHandler.cpp",
      ]
      deps = [
        ":flags",
        ":gpu_tool_utils",
        ":skia",
        ":tool_utils",
        "//third_party/libmicrohttpd",
      ]
    }
  }

  test_app("fuzz") {
    sources = [
      "fuzz/Fuzz.cpp",
      "fuzz/FuzzCanvas.cpp",
      "fuzz/FuzzCommon.cpp",
      "fuzz/FuzzDrawFunctions.cpp",
      "fuzz/FuzzEncoders.cpp",
      "fuzz/FuzzGradients.cpp",
      "fuzz/FuzzMain.cpp",
      "fuzz/FuzzParsePath.cpp",
      "fuzz/FuzzPathMeasure.cpp",
      "fuzz/FuzzPathop.cpp",
      "fuzz/FuzzPolyUtils.cpp",
      "fuzz/FuzzRegionOp.cpp",
      "fuzz/FuzzSkDescriptor.cpp",
      "fuzz/oss_fuzz/FuzzAndroidCodec.cpp",
      "fuzz/oss_fuzz/FuzzAnimatedImage.cpp",
      "fuzz/oss_fuzz/FuzzImage.cpp",
      "fuzz/oss_fuzz/FuzzImageFilterDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzIncrementalImage.cpp",
      "fuzz/oss_fuzz/FuzzJSON.cpp",
      "fuzz/oss_fuzz/FuzzPathDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzRegionDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzRegionSetPath.cpp",
      "fuzz/oss_fuzz/FuzzSKSL2GLSL.cpp",
      "fuzz/oss_fuzz/FuzzSKSL2Metal.cpp",
      "fuzz/oss_fuzz/FuzzSKSL2Pipeline.cpp",
      "fuzz/oss_fuzz/FuzzSKSL2SPIRV.cpp",
      "fuzz/oss_fuzz/FuzzSkDescriptorDeserialize.cpp",
      "fuzz/oss_fuzz/FuzzTextBlobDeserialize.cpp",
      "tools/UrlDataManager.cpp",
      "tools/debugger/DebugCanvas.cpp",
      "tools/debugger/DebugLayerManager.cpp",
      "tools/debugger/DrawCommand.cpp",
      "tools/debugger/JsonWriteBuffer.cpp",
    ]
    deps = [
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      "modules/skottie:fuzz",
    ]
  }

  test_app("pathops_unittest") {
    sources = pathops_tests_sources + [
                rebase_path("tests/skia_test.cpp"),
                rebase_path("tests/Test.cpp"),
              ]
    deps = [
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
    ]
  }

  test_app("dump_record") {
    sources = [
      "tools/DumpRecord.cpp",
      "tools/dump_record.cpp",
    ]
    deps = [
      ":flags",
      ":skia",
    ]
  }

  test_app("skdiff") {
    sources = [
      "tools/skdiff/skdiff.cpp",
      "tools/skdiff/skdiff_html.cpp",
      "tools/skdiff/skdiff_main.cpp",
      "tools/skdiff/skdiff_utils.cpp",
    ]
    deps = [
      ":skia",
      ":tool_utils",
    ]
  }

  test_app("skp_parser") {
    sources = [ "tools/skp_parser.cpp" ]
    deps = [
      ":skia",
      ":tool_utils",
    ]
  }

  if (!is_win) {
    source_set("skqp_lib") {
      check_includes = false
      testonly = true
      if (!is_official_build) {
        configs -= [ "//gn:warnings" ]
      }
      public_configs = [ ":skia_private" ]
      defines =
          [ "SK_SKQP_GLOBAL_ERROR_TOLERANCE=$skia_skqp_global_error_tolerance" ]
      sources = [
        "dm/DMGpuTestProcs.cpp",
        "tools/skqp/src/skqp.cpp",
        "tools/skqp/src/skqp_model.cpp",
      ]
      deps = [
        ":gm",
        ":skia",
        ":tests",
        ":tool_utils",
      ]
    }
    test_app("skqp") {
      sources = [ "tools/skqp/src/skqp_main.cpp" ]
      include_dirs = [ "//" ]
      lib_dirs = []
      deps = [ ":skqp_lib" ]
    }
    test_app("jitter_gms") {
      sources = [ "tools/skqp/jitter_gms.cpp" ]
      deps = [
        ":gm",
        ":skia",
        ":skqp_lib",
      ]
    }
  }
  if (is_fuchsia) {
    # Build a package repository for skqp on Fuchsia.
    group("skqp_repo") {
      testonly = true
      deps = [ "//build/fuchsia/skqp:skqp_repo" ]
    }
  }
  if (is_android) {
    shared_library("libskqp_app") {
      configs += [ ":skia_private" ]
      if (!is_official_build) {
        configs -= [ "//gn:warnings" ]
      }
      testonly = true
      sources = [ "tools/skqp/src/jni_skqp.cpp" ]
      deps = [
        ":skia",
        ":skqp_lib",
        ":tool_utils",
      ]
      libs = [ "android" ]
    }
  }
  if (is_android && skia_use_gl) {
    test_app("skottie_android") {
      is_shared_library = true

      sources = [
        "platform_tools/android/apps/skottie/src/main/cpp/JavaInputStreamAdaptor.cpp",
        "platform_tools/android/apps/skottie/src/main/cpp/native-lib.cpp",
      ]
      libs = []

      deps = [
        ":skia",
        "modules/skottie",
        "modules/sksg:samples",
      ]
    }
  }

  test_app("list_gms") {
    sources = [ "tools/list_gms.cpp" ]
    deps = [
      ":gm",
      ":skia",
    ]
  }
  test_app("list_gpu_unit_tests") {
    sources = [
      "dm/DMGpuTestProcs.cpp",
      "tools/list_gpu_unit_tests.cpp",
    ]
    deps = [
      ":skia",
      ":tests",
    ]
  }

  test_lib("sk_app") {
    public_deps = [
      ":gpu_tool_utils",
      ":skia",
    ]
    sources = [
      "tools/sk_app/CommandSet.cpp",
      "tools/sk_app/Window.cpp",
    ]
    libs = []

    if (is_android) {
      sources += [
        "tools/sk_app/android/RasterWindowContext_android.cpp",
        "tools/sk_app/android/Window_android.cpp",
        "tools/sk_app/android/main_android.cpp",
        "tools/sk_app/android/surface_glue_android.cpp",
      ]
      libs += [ "android" ]
    } else if (is_linux) {
      sources += [
        "tools/sk_app/unix/RasterWindowContext_unix.cpp",
        "tools/sk_app/unix/Window_unix.cpp",
        "tools/sk_app/unix/keysym2ucs.c",
        "tools/sk_app/unix/main_unix.cpp",
      ]
      libs += [
        "GL",  # Used by raster window context, so cannot be behind skia_use_gl.
        "X11",
      ]
    } else if (is_win) {
      sources += [
        "tools/sk_app/win/RasterWindowContext_win.cpp",
        "tools/sk_app/win/Window_win.cpp",
        "tools/sk_app/win/main_win.cpp",
      ]
    } else if (is_mac) {
      sources += [
        "tools/sk_app/mac/RasterWindowContext_mac.mm",
        "tools/sk_app/mac/Window_mac.mm",
        "tools/sk_app/mac/main_mac.mm",
      ]
      libs += [
        "QuartzCore.framework",
        "Cocoa.framework",
        "Foundation.framework",
      ]
    } else if (is_ios) {
      sources += [
        "tools/sk_app/ios/RasterWindowContext_ios.mm",
        "tools/sk_app/ios/Window_ios.mm",
        "tools/sk_app/ios/main_ios.mm",
      ]
      libs += [ "QuartzCore.framework" ]
    }

    if (skia_use_gl) {
      sources += [ "tools/sk_app/GLWindowContext.cpp" ]
      if (is_android) {
        sources += [ "tools/sk_app/android/GLWindowContext_android.cpp" ]
      } else if (is_linux) {
        sources += [ "tools/sk_app/unix/GLWindowContext_unix.cpp" ]
      } else if (is_win) {
        sources += [ "tools/sk_app/win/GLWindowContext_win.cpp" ]
        if (skia_use_angle) {
          sources += [ "tools/sk_app/win/ANGLEWindowContext_win.cpp" ]
        }
      } else if (is_mac) {
        sources += [ "tools/sk_app/mac/GLWindowContext_mac.mm" ]
      } else if (is_ios) {
        sources += [ "tools/sk_app/ios/GLWindowContext_ios.mm" ]
      }
    }

    if (skia_use_vulkan) {
      sources += [ "tools/sk_app/VulkanWindowContext.cpp" ]
      if (is_android) {
        sources += [ "tools/sk_app/android/VulkanWindowContext_android.cpp" ]
      } else if (is_linux) {
        sources += [ "tools/sk_app/unix/VulkanWindowContext_unix.cpp" ]
        libs += [ "X11-xcb" ]
      } else if (is_win) {
        sources += [ "tools/sk_app/win/VulkanWindowContext_win.cpp" ]
      }
    }

    if (skia_use_metal) {
      sources += [ "tools/sk_app/MetalWindowContext.mm" ]
      if (is_mac) {
        sources += [ "tools/sk_app/mac/MetalWindowContext_mac.mm" ]
      } else if (is_ios) {
        sources += [ "tools/sk_app/ios/MetalWindowContext_ios.mm" ]
      }
    }

    if (skia_use_dawn) {
      sources += [ "tools/sk_app/DawnWindowContext.cpp" ]
      if (is_linux) {
        if (dawn_enable_vulkan) {
          sources += [ "tools/sk_app/unix/DawnVulkanWindowContext_unix.cpp" ]
          defines = [ "VK_USE_PLATFORM_XCB_KHR" ]
          libs += [ "X11-xcb" ]
        }
      } else if (is_win) {
        if (dawn_enable_d3d12) {
          sources += [ "tools/sk_app/win/DawnD3D12WindowContext_win.cpp" ]
        }
      } else if (is_mac) {
        if (dawn_enable_metal) {
          sources += [ "tools/sk_app/mac/DawnMTLWindowContext_mac.mm" ]
        }
      }
    }

    deps = [ ":tool_utils" ]
    if (is_android) {
      deps += [ "//third_party/native_app_glue" ]
    }
    if (skia_use_gl && skia_use_angle) {
      deps += [ "//third_party/angle2" ]
    }
  }

  if (!skia_use_vulkan && (is_mac || is_linux || is_win)) {
    test_app("fiddle_examples") {
      sources = [
        "tools/fiddle/all_examples.cpp",
        "tools/fiddle/examples.cpp",
        "tools/fiddle/examples.h",
      ]
      if (is_win) {
        cflags = [
          "/wd4756",  # Overflow in constant arithmetic
          "/wd4305",  # truncation from 'double' to 'float'
        ]
      }
      deps = [
        ":skia",
        ":skia.h",
        "modules/skottie",
        "modules/skshaper",
      ]
    }
  }

  # sk_app can work without GL but viewer always runs raster through a GL window context.
  if (skia_use_gl) {
    test_app("viewer") {
      is_shared_library = is_android
      sources = [
        "tools/viewer/AnimTimer.h",
        "tools/viewer/BisectSlide.cpp",
        "tools/viewer/GMSlide.cpp",
        "tools/viewer/ImGuiLayer.cpp",
        "tools/viewer/ImageSlide.cpp",
        "tools/viewer/ParticlesSlide.cpp",
        "tools/viewer/SKPSlide.cpp",
        "tools/viewer/SampleSlide.cpp",
        "tools/viewer/SkSLSlide.cpp",
        "tools/viewer/SkottieSlide.cpp",
        "tools/viewer/SlideDir.cpp",
        "tools/viewer/StatsLayer.cpp",
        "tools/viewer/SvgSlide.cpp",
        "tools/viewer/TouchGesture.cpp",
        "tools/viewer/TouchGesture.h",
        "tools/viewer/Viewer.cpp",
      ]
      libs = []

      deps = [
        ":common_flags_gpu",
        ":experimental_svg_model",
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":samples",
        ":sk_app",
        ":skia",
        ":tool_utils",
        ":trace",
        "modules/particles",
        "modules/skottie",
        "modules/skottie:utils",
        "modules/sksg:samples",
        "//third_party/imgui",
      ]
      if (skia_use_experimental_xform) {
        deps += [ ":experimental_xform" ]
        sources += [ "gm/xform.cpp" ]
      }
    }
  }

  if (skia_use_gl && !skia_use_angle && (is_linux || is_win || is_mac)) {
    test_app("HelloWorld") {
      sources = [ "example/HelloWorld.cpp" ]
      libs = []

      deps = [
        ":flags",
        ":gpu_tool_utils",
        ":sk_app",
        ":skia",
        ":tool_utils",
      ]
    }
  }

  if (skia_use_gl && (is_linux || is_mac || is_ios) &&
      target_cpu != "mips64el" && target_cpu != "loongson3a") {
    test_app("SkiaSDLExample") {
      sources = [ "example/SkiaSDLExample.cpp" ]
      libs = []
      deps = [
        ":gpu_tool_utils",
        ":skia",
        "//third_party/libsdl",
      ]
    }
  }

  if (skia_qt_path != "" && (is_win || is_linux || is_mac)) {
    action_foreach("generate_mocs") {
      script = "gn/call.py"
      sources = [ "tools/mdbviz/MainWindow.h" ]
      outputs = [ "$target_gen_dir/mdbviz/{{source_name_part}}_moc.cpp" ]
      args = [
        "$skia_qt_path" + "/bin/moc",
        "{{source}}",
        "-o",
        "gen/mdbviz/{{source_name_part}}_moc.cpp",
      ]
    }
    action_foreach("generate_resources") {
      script = "gn/call.py"
      sources = [ "tools/mdbviz/resources.qrc" ]
      outputs = [ "$target_gen_dir/mdbviz/{{source_name_part}}_res.cpp" ]
      args = [
        "$skia_qt_path" + "/bin/rcc",
        "{{source}}",
        "-o",
        "gen/mdbviz/{{source_name_part}}_res.cpp",
      ]
    }
    test_app("mdbviz") {
      if (is_win) {
        # on Windows we need to disable some exception handling warnings due to the Qt headers
        cflags = [ "/Wv:18" ]  # 18 -> VS2013, 19 -> VS2015, 1910 -> VS2017
      }
      sources = [
        "tools/UrlDataManager.cpp",
        "tools/debugger/DebugCanvas.cpp",
        "tools/debugger/DebugLayerManager.cpp",
        "tools/debugger/DrawCommand.cpp",
        "tools/debugger/JsonWriteBuffer.cpp",
        "tools/mdbviz/MainWindow.cpp",
        "tools/mdbviz/Model.cpp",
        "tools/mdbviz/main.cpp",

        # generated files
        "$target_gen_dir/mdbviz/MainWindow_moc.cpp",
        "$target_gen_dir/mdbviz/resources_res.cpp",
      ]
      lib_dirs = [ "$skia_qt_path/lib" ]
      libs = [
        "Qt5Core.lib",
        "Qt5Gui.lib",
        "Qt5Widgets.lib",
      ]
      include_dirs = [
        "$skia_qt_path/include",
        "$skia_qt_path/include/QtCore",
        "$skia_qt_path/include/QtWidgets",
      ]
      deps = [
        ":generate_mocs",
        ":generate_resources",
        ":skia",
      ]
    }
  }

  if (is_android && defined(ndk) && ndk != "") {
    copy("gdbserver") {
      sources = [ "$ndk/$ndk_gdbserver" ]
      outputs = [ "$root_out_dir/gdbserver" ]
    }
  }

  if (skia_use_opencl) {
    test_app("hello-opencl") {
      sources = [ "tools/hello-opencl.cpp" ]
      deps = [ "//third_party/opencl" ]
    }
  }

  executable("cpu_modules") {
    sources = [ "tools/cpu_modules.cpp" ]
    deps = [
      ":skia",
      "modules/particles",
    ]
  }

  if (skia_use_gl && skia_use_icu && skia_use_harfbuzz) {
    test_app("editor") {
      is_shared_library = is_android
      deps = [ "modules/skplaintexteditor:editor_app" ]
    }
  }

  executable("image_diff_metric") {
    sources = [ "tools/image_diff_metric.cpp" ]
    deps = [ ":skia" ]
  }

  group("modules_testonly") {
    testonly = true
    deps = []
    if (target_cpu == "wasm") {
      deps += [ "modules/canvaskit:viewer_wasm" ]
    }
  }
}

if (is_ios && skia_use_metal && !skia_enable_flutter_defines) {
  group("minimal_ios_mtl_skia_app") {
    deps = [ "experimental/minimal_ios_mtl_skia_app" ]
  }
}

if (is_ios && skia_enable_skottie && !skia_enable_flutter_defines) {
  group("skottie_ios") {
    deps = [ "tools/skottie_ios_app" ]
  }
}
