# 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/android_framework_defines.gni")
import("gn/shared_sources.gni")

if (!defined(is_skia_standalone)) {
  is_skia_standalone = false
}

declare_args() {
  skia_use_angle = false
  skia_use_expat = true
  skia_use_fontconfig = is_linux
  skia_use_freetype = is_android || is_fuchsia || is_linux
  skia_use_gdi = false
  skia_use_icu = !is_fuchsia && !is_ios && !is_win  # TODO: Windows
  skia_use_libjpeg_turbo = true
  skia_use_libpng = true
  skia_use_libwebp = !is_fuchsia
  skia_use_lua = false
  skia_use_mesa = false
  skia_use_piex = !is_win
  skia_use_zlib = true

  skia_enable_android_framework_defines = false
  skia_enable_gpu = true
  skia_enable_tools = is_skia_standalone
  skia_enable_vulkan_debug_layers = is_skia_standalone && is_debug
  skia_vulkan_sdk = getenv("VULKAN_SDK")
}
declare_args() {
  skia_use_dng_sdk =
      !is_fuchsia && !is_win && skia_use_libjpeg_turbo && skia_use_zlib
  skia_use_sfntly = skia_use_icu

  if (is_android) {
    skia_use_vulkan = defined(ndk_api) && ndk_api >= 24
  } else {
    skia_use_vulkan = skia_vulkan_sdk != ""
  }
}

# Our tools require static linking (they use non-exported symbols).
skia_enable_tools = skia_enable_tools && !is_component_build

fontmgr_android_enabled = skia_use_expat && skia_use_freetype

skia_public_includes = [
  "include/android",
  "include/c",
  "include/codec",
  "include/config",
  "include/core",
  "include/effects",
  "include/gpu",
  "include/gpu/gl",
  "include/images",
  "include/pathops",
  "include/ports",
  "include/svg",
  "include/utils",
  "include/utils/mac",
  "include/xml",
]

# Skia public API, generally provided by :skia.
config("skia_public") {
  include_dirs = skia_public_includes
  defines = []
  if (is_component_build) {
    defines += [ "SKIA_DLL" ]
  }
  if (is_fuchsia || is_linux) {
    defines += [ "SK_SAMPLES_FOR_X" ]
  }
  if (skia_enable_android_framework_defines) {
    defines += android_framework_defines
  }
  if (!skia_enable_gpu) {
    defines += [ "SK_SUPPORT_GPU=0" ]
  }
}

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

  include_dirs = [
    "include/private",
    "src/c",
    "src/codec",
    "src/core",
    "src/effects",
    "src/effects/gradients",
    "src/fonts",
    "src/gpu",
    "src/image",
    "src/images",
    "src/lazy",
    "src/opts",
    "src/pathops",
    "src/pdf",
    "src/ports",
    "src/sfnt",
    "src/sksl",
    "src/utils",
    "src/utils/win",
    "third_party/etc1",
    "third_party/gif",
    "third_party/ktx",
  ]

  defines = [
    "SK_GAMMA_APPLY_TO_A8",
    "SK_INTERNAL",
  ]
  if (is_android) {
    defines += [
      "SK_GAMMA_EXPONENT=1.4",
      "SK_GAMMA_CONTRAST=0.0",
    ]
  }
  if (is_official_build || is_android) {
    # TODO(bsalomon): it'd be nice to make Android normal.
    defines += [ "SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=0" ]
  }
  libs = []
  lib_dirs = []
  if (skia_use_vulkan) {
    if (skia_vulkan_sdk != "" && !is_android) {
      if (is_win) {
        include_dirs += [ "$skia_vulkan_sdk/Include/" ]
        lib_dirs += [ "$skia_vulkan_sdk/Bin" ]
      } else {
        include_dirs += [ "$skia_vulkan_sdk/include/" ]
        lib_dirs += [ "$skia_vulkan_sdk/lib/" ]
      }
    }
    if (is_win) {
      libs += [ "vulkan-1.lib" ]
    } else {
      libs += [ "vulkan" ]
    }
  }
  if (skia_use_angle) {
    defines += [ "SK_ANGLE" ]
  }
}

# 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") {
  if (invoker.enabled) {
    source_set(target_name) {
      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) {
      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_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_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_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_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" ]
  }
}

opts("hsw") {
  enabled = is_x86
  sources = skia_opts.hsw_sources
  if (is_win) {
    cflags = [ "/arch:AVX2" ]
  } else {
    cflags = [
      "-mavx2",
      "-mbmi",
      "-mbmi2",
      "-mf16c",
      "-mfma",
    ]
  }
}

# Any feature of Skia that requires third-party code should be optional and use this template.
template("optional") {
  if (invoker.enabled) {
    config(target_name + "_public") {
      if (defined(invoker.public_defines)) {
        defines = invoker.public_defines
      }
    }
    source_set(target_name) {
      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",
                               "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("fontmgr_android") {
  enabled = fontmgr_android_enabled

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

optional("fontmgr_custom") {
  enabled = is_linux && skia_use_freetype && !skia_use_fontconfig

  deps = [
    "//third_party/freetype2",
  ]
  sources = [
    "src/ports/SkFontMgr_custom.cpp",
    "src/ports/SkFontMgr_custom_directory_factory.cpp",
  ]
}

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

  deps = [
    "//third_party:fontconfig",
    "//third_party/freetype2",
  ]
  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 = is_fuchsia && skia_use_freetype

  deps = [
    "//third_party/freetype2",
  ]
  sources = [
    "src/ports/SkFontMgr_custom.cpp",
    "src/ports/SkFontMgr_custom_empty_factory.cpp",
  ]
}

optional("gpu") {
  enabled = skia_enable_gpu
  public_defines = []

  sources = skia_gpu_sources + [ "src/gpu/gl/GrGLDefaultInterface_native.cpp" ]

  # These paths need to be absolute to match the ones produced by shared_sources.gni.
  sources -= get_path_info([
                             "src/gpu/gl/GrGLCreateNativeInterface_none.cpp",
                             "src/gpu/gl/GrGLDefaultInterface_none.cpp",
                           ],
                           "abspath")
  libs = []
  if (is_android) {
    sources += [ "src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp" ]
  } else if (is_linux) {
    sources += [ "src/gpu/gl/glx/GrGLCreateNativeInterface_glx.cpp" ]
  } else if (is_mac) {
    sources += [ "src/gpu/gl/mac/GrGLCreateNativeInterface_mac.cpp" ]
  } else if (is_ios) {
    sources += [ "src/gpu/gl/iOS/GrGLCreateNativeInterface_iOS.cpp" ]
  } else if (is_win) {
    sources += [ "src/gpu/gl/win/GrGLCreateNativeInterface_win.cpp" ]
    libs += [ "OpenGL32.lib" ]
  } else {
    sources += [ "src/gpu/gl/GrGLCreateNativeInterface_none.cpp" ]
  }

  if (skia_use_vulkan) {
    public_defines += [ "SK_VULKAN" ]
    sources += skia_vk_sources
    if (skia_enable_vulkan_debug_layers) {
      public_defines += [ "SK_ENABLE_VK_LAYERS" ]
    }
  }
}

optional("jpeg") {
  enabled = skia_use_libjpeg_turbo
  public_defines = [ "SK_HAS_JPEG_LIBRARY" ]

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

optional("pdf") {
  enabled = skia_use_zlib

  deps = [
    "//third_party/zlib",
  ]
  sources = skia_pdf_sources
  sources_when_disabled = [ "src/pdf/SkDocument_PDF_None.cpp" ]

  if (skia_use_sfntly) {
    deps += [ "//third_party/sfntly" ]
    public_defines = [ "SK_PDF_USE_SFNTLY" ]
  }
}

optional("png") {
  enabled = skia_use_libpng
  public_defines = [ "SK_HAS_PNG_LIBRARY" ]

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

optional("raw") {
  enabled = skia_use_dng_sdk && skia_use_libjpeg_turbo && 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/SkRawAdapterCodec.cpp",
    "src/codec/SkRawCodec.cpp",
  ]
}

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") {
  enabled = skia_use_libwebp
  public_defines = [ "SK_HAS_WEBP_LIBRARY" ]

  deps = [
    "//third_party/libwebp",
  ]
  sources = [
    "src/codec/SkWebpAdapterCodec.cpp",
    "src/codec/SkWebpCodec.cpp",
    "src/images/SkWEBPImageEncoder.cpp",
  ]
}

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

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

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

  deps = [
    ":arm64",
    ":armv7",
    ":avx",
    ":crc32",
    ":fontmgr_android",
    ":fontmgr_custom",
    ":fontmgr_fontconfig",
    ":fontmgr_fuchsia",
    ":gpu",
    ":hsw",
    ":jpeg",
    ":none",
    ":pdf",
    ":png",
    ":raw",
    ":sse2",
    ":sse41",
    ":sse42",
    ":ssse3",
    ":typeface_freetype",
    ":webp",
    ":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([])

  sources = []
  sources += skia_core_sources
  sources += skia_effects_sources
  sources += skia_sksl_sources
  sources += skia_utils_sources
  sources += skia_xps_sources
  sources += [
    "src/android/SkBitmapRegionCodec.cpp",
    "src/android/SkBitmapRegionDecoder.cpp",
    "src/codec/SkAndroidCodec.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/SkGifCodec.cpp",
    "src/codec/SkMaskSwizzler.cpp",
    "src/codec/SkMasks.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",
    "src/svg/SkSVGCanvas.cpp",
    "src/svg/SkSVGDevice.cpp",
    "src/utils/mac/SkStream_mac.cpp",
    "third_party/etc1/etc1.cpp",
    "third_party/gif/SkGifImageReader.cpp",
    "third_party/ktx/ktx.cpp",
  ]

  libs = []

  if (is_win) {
    sources += [
      "src/fonts/SkFontMgr_indirect.cpp",
      "src/ports/SkDebug_win.cpp",
      "src/ports/SkFontHost_win.cpp",
      "src/ports/SkFontMgr_win_dw.cpp",
      "src/ports/SkImageEncoder_WIC.cpp",
      "src/ports/SkImageGeneratorWIC.cpp",
      "src/ports/SkOSFile_win.cpp",
      "src/ports/SkOSLibrary_win.cpp",
      "src/ports/SkScalerContext_win_dw.cpp",
      "src/ports/SkTLS_win.cpp",
      "src/ports/SkTypeface_win_dw.cpp",
    ]
    if (skia_use_gdi) {
      sources += [ "src/ports/SkFontMgr_win_gdi_factory.cpp" ]
      libs += [
        "Gdi32.lib",
        "Usp10.lib",
      ]
    } else {
      sources += [ "src/ports/SkFontMgr_win_dw_factory.cpp" ]
    }
    sources -=
        [ get_path_info("src/utils/SkThreadUtils_pthread.cpp", "abspath") ]
    libs += [
      "FontSub.lib",
      "Ole32.lib",
      "OleAut32.lib",
      "User32.lib",
    ]
  } else {
    sources += [
      "src/ports/SkOSFile_posix.cpp",
      "src/ports/SkOSLibrary_posix.cpp",
      "src/ports/SkTLS_pthread.cpp",
    ]
  }

  if (is_android) {
    deps += [ "//third_party/expat" ]
    sources += [ "src/ports/SkDebug_android.cpp" ]
    libs += [
      "EGL",
      "GLESv2",
      "log",
    ]
  }

  if (is_linux) {
    libs += [
      "GL",
      "GLU",
      "X11",
    ]
    sources += [ "src/ports/SkDebug_stdio.cpp" ]
  }

  if (is_mac) {
    sources += [
      "src/ports/SkDebug_stdio.cpp",
      "src/ports/SkFontHost_mac.cpp",
      "src/ports/SkImageEncoder_CG.cpp",
      "src/ports/SkImageGeneratorCG.cpp",
    ]
    libs += [
      "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",
    ]
  }

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

# Targets guarded by skia_enable_tools may use //third_party freely.
if (skia_enable_tools) {
  # Used by gn_to_bp.py to list our public include dirs.
  source_set("public") {
    configs += [ ":skia_public" ]
  }

  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(skia_h, root_build_dir) ] +
           rebase_path(skia_public_includes)
    depfile = "$skia_h.deps"
    outputs = [
      skia_h,
    ]
  }

  if (skia_enable_gpu && target_cpu == "x64") {
    # Our bots only have 64-bit libOSMesa installed.
    # TODO: worth fixing?
    executable("fiddle") {
      libs = []
      if (is_linux) {
        libs += [ "OSMesa" ]
      }

      sources = [
        "tools/fiddle/draw.cpp",
        "tools/fiddle/fiddle_main.cpp",
      ]
      deps = [
        ":skia",
        ":skia.h",
      ]
    }
  }

  if (skia_enable_gpu) {
    source_set("public_headers_warnings_check") {
      sources = [
        "tools/public_headers_warnings_check.cpp",
      ]
      configs -= [ "//gn:warnings_except_public_headers" ]
      deps = [
        ":skia",
        ":skia.h",
      ]
    }
  }

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

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

  test_lib("gpu_tool_utils") {
    public_include_dirs = []
    if (skia_enable_gpu) {
      public_defines = []
      public_include_dirs += [ "tools/gpu" ]

      deps = []
      sources = [
        "tools/gpu/GrContextFactory.cpp",
        "tools/gpu/GrTest.cpp",
        "tools/gpu/TestContext.cpp",
        "tools/gpu/gl/GLTestContext.cpp",
        "tools/gpu/gl/command_buffer/GLTestContext_command_buffer.cpp",
        "tools/gpu/gl/debug/DebugGLTestContext.cpp",
        "tools/gpu/gl/debug/GrBufferObj.cpp",
        "tools/gpu/gl/debug/GrFrameBufferObj.cpp",
        "tools/gpu/gl/debug/GrProgramObj.cpp",
        "tools/gpu/gl/debug/GrShaderObj.cpp",
        "tools/gpu/gl/debug/GrTextureObj.cpp",
        "tools/gpu/gl/debug/GrTextureUnitObj.cpp",
        "tools/gpu/gl/null/NullGLTestContext.cpp",
      ]
      libs = []

      if (is_android) {
        sources += [ "tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp" ]
      } else if (is_ios) {
        sources += [ "tools/gpu/gl/iOS/CreatePlatformGLTestContext_iOS.mm" ]
        libs += [ "OpenGLES.framework" ]
      } else if (is_linux) {
        sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
      } else if (is_mac) {
        sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
      } else if (is_win) {
        sources += [ "tools/gpu/gl/win/CreatePlatformGLTestContext_win.cpp" ]
        libs += [
          "Gdi32.lib",
          "OpenGL32.lib",
        ]
      }

      if (skia_use_angle) {
        deps += [ "//third_party/angle2" ]
        sources += [ "tools/gpu/gl/angle/GLTestContext_angle.cpp" ]
      }
      if (skia_use_mesa) {
        public_defines += [ "SK_MESA" ]
        sources += [ "tools/gpu/gl/mesa/GLTestContext_mesa.cpp" ]
        libs += [ "OSMesa" ]
      }
      if (skia_use_vulkan) {
        sources += [ "tools/gpu/vk/VkTestContext.cpp" ]
      }
    }
  }

  test_lib("flags") {
    public_include_dirs = [ "tools/flags" ]
    sources = [
      "tools/flags/SkCommandLineFlags.cpp",
    ]
  }
  test_lib("common_flags") {
    public_include_dirs = [ "tools/flags" ]
    sources = [
      "tools/flags/SkCommonFlags.cpp",
      "tools/flags/SkCommonFlagsConfig.cpp",
    ]
    deps = [
      ":flags",
      ":gpu_tool_utils",
    ]
  }

  test_lib("tool_utils") {
    public_include_dirs = [
      "tools",
      "tools/debugger",
      "tools/timer",
    ]
    sources = [
      "src/utils/SkMultiPictureDocumentReader.cpp",  # TODO(halcanary): move to tools?
      "tools/AndroidSkDebugToStdOut.cpp",
      "tools/CrashHandler.cpp",
      "tools/LsanSuppressions.cpp",
      "tools/ProcStats.cpp",
      "tools/Resources.cpp",
      "tools/ThermalManager.cpp",
      "tools/UrlDataManager.cpp",
      "tools/debugger/SkDebugCanvas.cpp",
      "tools/debugger/SkDrawCommand.cpp",
      "tools/debugger/SkJsonWriteBuffer.cpp",
      "tools/debugger/SkObjectParser.cpp",
      "tools/picture_utils.cpp",
      "tools/random_parse_path.cpp",
      "tools/sk_tool_utils.cpp",
      "tools/sk_tool_utils_font.cpp",
      "tools/timer/Timer.cpp",
    ]
    deps = [
      ":common_flags",
      ":flags",
      "//third_party/libpng",
    ]
    public_deps = [
      "//third_party/jsoncpp",
    ]
  }

  import("gn/gm.gni")
  test_lib("gm") {
    public_include_dirs = [ "gm" ]
    sources = gm_sources
    deps = [
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
    ]
  }

  import("gn/tests.gni")
  test_lib("tests") {
    public_include_dirs = [ "tests" ]
    sources = tests_sources + pathops_tests_sources
    if (!fontmgr_android_enabled) {
      sources -= [ "//tests/FontMgrAndroidParserTest.cpp" ]
    }
    deps = [
      ":experimental_svg_model",
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
      "//third_party/libpng",
      "//third_party/zlib",
    ]
  }

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

  test_lib("experimental_svg_model") {
    public_include_dirs = [ "experimental/svg/model" ]
    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/SkSVGLine.cpp",
      "experimental/svg/model/SkSVGLinearGradient.cpp",
      "experimental/svg/model/SkSVGNode.cpp",
      "experimental/svg/model/SkSVGPath.cpp",
      "experimental/svg/model/SkSVGPoly.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/SkSVGTransformableNode.cpp",
      "experimental/svg/model/SkSVGValue.cpp",
    ]
    deps = [
      ":skia",
    ]
  }

  test_lib("views") {
    public_include_dirs = [ "include/views" ]
    sources = [
      "src/views/SkEvent.cpp",
      "src/views/SkEventSink.cpp",
      "src/views/SkOSMenu.cpp",
      "src/views/SkTagList.cpp",
      "src/views/SkTouchGesture.cpp",
      "src/views/SkView.cpp",
      "src/views/SkViewPriv.cpp",
    ]
    libs = []
    deps = []
    if (!is_android) {
      sources += [ "src/views/SkWindow.cpp" ]
    }
    if (is_linux) {
      public_include_dirs += [ "src/views/unix" ]
      sources += [
        "src/views/unix/SkOSWindow_Unix.cpp",
        "src/views/unix/keysym2ucs.c",
      ]
    } else if (is_mac) {
      sources += [
        "src/views/mac/SkEventNotifier.mm",
        "src/views/mac/SkNSView.mm",
        "src/views/mac/SkOSWindow_Mac.mm",
        "src/views/mac/SkTextFieldCell.m",
      ]
      libs += [
        "QuartzCore.framework",
        "Cocoa.framework",
        "Foundation.framework",
      ]
    } else if (is_win) {
      sources += [ "src/views/win/SkOSWindow_win.cpp" ]
    }
    if (skia_use_angle) {
      deps += [ "//third_party/angle2" ]
    }
  }

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

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

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

  import("gn/samples.gni")
  test_lib("samples") {
    public_include_dirs = [ "samplecode" ]
    include_dirs = [ "experimental" ]
    sources = samples_sources + [
                "experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp",
                "experimental/SkSetPoly3To3.cpp",
                "experimental/SkSetPoly3To3_A.cpp",
                "experimental/SkSetPoly3To3_D.cpp",
              ]
    deps = [
      ":experimental_svg_model",
      ":gm",
      ":tool_utils",
      ":views",
      ":xml",
    ]

    if (skia_use_lua) {
      sources += [ "samplecode/SampleLua.cpp" ]
      deps += [
        ":lua",
        "//third_party/lua",
      ]
    }
  }

  executable("dm") {
    sources = [
      "dm/DM.cpp",
      "dm/DMJsonWriter.cpp",
      "dm/DMSrcSink.cpp",
    ]
    include_dirs = [ "tests" ]
    deps = [
      ":common_flags",
      ":experimental_svg_model",
      ":flags",
      ":gm",
      ":gpu_tool_utils",
      ":skia",
      ":tests",
      ":tool_utils",
      "//third_party/jsoncpp",
      "//third_party/libpng",
    ]
    testonly = true
  }

  if (!is_debug) {  # I've benchmarked debug code once too many times...
    executable("monobench") {
      sources = [
        "tools/monobench.cpp",
      ]
      deps = [
        ":bench",
        ":skia",
      ]
      testonly = true
    }
  }

  executable("nanobench") {
    sources = [
      "bench/nanobench.cpp",
    ]
    deps = [
      ":bench",
      ":common_flags",
      ":experimental_svg_model",
      ":flags",
      ":gm",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
      "//third_party/jsoncpp",
    ]
    testonly = true
  }

  if (is_linux || is_win || is_mac) {
    executable("SampleApp") {
      sources = [
        "samplecode/SampleApp.cpp",
        "samplecode/SamplePictFile.cpp",
      ]
      if (is_mac) {
        sources += [ "src/views/mac/skia_mac.mm" ]
      } else if (is_win) {
        sources += [ "src/views/win/skia_win.cpp" ]
      } else if (is_linux) {
        sources += [ "src/views/unix/skia_unix.cpp" ]
      }
      deps = [
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":samples",
        ":skia",
        ":tool_utils",
        ":views",
      ]
      if (skia_use_angle) {
        deps += [ "//third_party/angle2" ]
      }
      testonly = true
    }
  }

  if (skia_enable_gpu) {
    executable("skpbench") {
      sources = [
        "tools/skpbench/skpbench.cpp",
      ]
      deps = [
        ":flags",
        ":gpu_tool_utils",
        ":skia",
        ":tool_utils",
      ]
      testonly = true
    }
  }

  # We can't yet build ICU on iOS or Windows.
  if (!is_ios && !is_win) {
    executable("sktexttopdf-hb") {
      sources = [
        "tools/SkShaper_harfbuzz.cpp",
        "tools/using_skia_and_harfbuzz.cpp",
      ]
      deps = [
        ":skia",
        "//third_party/harfbuzz",
      ]
      testonly = true
    }
  }
  executable("sktexttopdf") {
    sources = [
      "tools/SkShaper_primitive.cpp",
      "tools/using_skia_and_harfbuzz.cpp",
    ]
    deps = [
      ":skia",
    ]
    testonly = true
  }

  executable("get_images_from_skps") {
    sources = [
      "tools/get_images_from_skps.cpp",
    ]
    deps = [
      ":flags",
      ":skia",
      "//third_party/jsoncpp",
    ]
    testonly = true
  }

  executable("colorspaceinfo") {
    sources = [
      "tools/colorspaceinfo.cpp",
    ]
    deps = [
      ":flags",
      ":skia",
      ":tool_utils",
    ]
    testonly = true
  }

  if (!is_ios) {
    executable("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/jsoncpp",
        "//third_party/libmicrohttpd",
        "//third_party/libpng",
      ]
      testonly = true
    }
  }

  executable("fuzz") {
    sources = [
      "fuzz/FilterFuzz.cpp",
      "fuzz/FuzzDrawFunctions.cpp",
      "fuzz/FuzzGradients.cpp",
      "fuzz/FuzzParsePath.cpp",
      "fuzz/FuzzPathop.cpp",
      "fuzz/FuzzScaleToSides.cpp",
      "fuzz/fuzz.cpp",
    ]
    deps = [
      ":flags",
      ":skia",
      ":tool_utils",
    ]
    testonly = true
  }

  executable("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",
    ]
    testonly = true
  }

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

  executable("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",
    ]
    testonly = true
  }

  executable("skp_parser") {
    sources = [
      "tools/skp_parser.cpp",
    ]
    deps = [
      ":skia",
      ":tool_utils",
      "//third_party/jsoncpp",
    ]
    testonly = true
  }

  if (skia_enable_gpu && (is_android || is_linux || is_win || is_mac)) {
    source_set("viewer_sources") {
      sources = [
        "tools/viewer/GMSlide.cpp",
        "tools/viewer/ImageSlide.cpp",
        "tools/viewer/SKPSlide.cpp",
        "tools/viewer/SampleSlide.cpp",
        "tools/viewer/Viewer.cpp",
        "tools/viewer/sk_app/CommandSet.cpp",
        "tools/viewer/sk_app/GLWindowContext.cpp",
        "tools/viewer/sk_app/Window.cpp",
        "tools/viewer/sk_app/WindowContext.cpp",
      ]
      libs = []

      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",
          "tools/viewer/sk_app/unix/Window_unix.cpp",
          "tools/viewer/sk_app/unix/main_unix.cpp",
        ]
      } else if (is_win) {
        sources += [
          "tools/viewer/sk_app/win/GLWindowContext_win.cpp",
          "tools/viewer/sk_app/win/RasterWindowContext_win.cpp",
          "tools/viewer/sk_app/win/Window_win.cpp",
          "tools/viewer/sk_app/win/main_win.cpp",
        ]
      } else if (is_mac) {
        sources += [
          "tools/viewer/sk_app/mac/GLWindowContext_mac.cpp",
          "tools/viewer/sk_app/mac/RasterWindowContext_mac.cpp",
          "tools/viewer/sk_app/mac/Window_mac.cpp",
          "tools/viewer/sk_app/mac/main_mac.cpp",
        ]
      }

      if (skia_use_vulkan) {
        sources += [ "tools/viewer/sk_app/VulkanWindowContext.cpp" ]
        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) {
          sources += [ "tools/viewer/sk_app/win/VulkanWindowContext_win.cpp" ]
        }
      }

      include_dirs = []
      deps = [
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":samples",
        ":skia",
        ":tool_utils",
        ":views",
        "//third_party/jsoncpp",
      ]
      if (is_android) {
        deps += [ "//third_party/native_app_glue" ]
      } else if (is_mac) {
        deps += [ "//third_party/libsdl" ]
      }
      testonly = true
    }

    if (is_android) {
      shared_library("libviewer") {
        deps = [
          ":viewer_sources",
        ]
        testonly = true
      }
    } else {
      executable("viewer") {
        deps = [
          ":viewer_sources",
        ]
        testonly = true
      }
    }
  }

  if (skia_enable_gpu) {
    executable("skslc") {
      sources = [
        "src/sksl/SkSLMain.cpp",
      ]
      deps = [
        ":flags",
        ":skia",
      ]
      testonly = true
    }
  }
}
