# 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/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_libjpeg_turbo = true
  skia_use_libpng = true
  skia_use_libwebp = !is_fuchsia
  skia_use_mesa = false
  skia_use_sfntly = !is_fuchsia && !is_win  # TODO: icu on Windows, re-enable this.
  skia_use_vulkan = is_android && defined(ndk_api) && ndk_api >= 24
  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 = ""
}

skia_use_vulkan = 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 += skia_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/config",
    "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" ]
  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 != "") {
      if (is_win) {
        include_dirs += [ "$skia_vulkan_sdk/Include/" ]
        lib_dirs += [ "$skia_vulkan_sdk/Bin" ]
      } else {
        include_dirs += [ "$skia_vulkan_sdk/x86_64/include/" ]
        lib_dirs += [ "$skia_vulkan_sdk/x86_64/lib/" ]
      }
    }
    if (is_win) {
      libs += [ "vulkan-1.lib" ]
    } else {
      libs += [ "vulkan" ]
    }
  }
}

# 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",
    ]
  }
}

opts("dsp") {
  enabled = current_cpu == "mipsel"
  sources = skia_opts.mips_dsp_sources
  cflags = []
}

# 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",
                             ])
      all_dependent_configs = [ ":" + target_name + "_public" ]
      configs += skia_library_configs
    }
  } else {
    source_set(target_name) {
      forward_variables_from(invoker,
                             "*",
                             [
                               "public_defines",
                               "deps",
                               "libs",
                               "sources",
                               "sources_when_disabled",
                             ])
      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_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("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

  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",
    ":dsp",
    ":fontmgr_android",
    ":fontmgr_custom",
    ":fontmgr_fontconfig",
    ":fontmgr_fuchsia",
    ":gpu",
    ":hsw",
    ":jpeg",
    ":none",
    ":pdf",
    ":png",
    ":sse2",
    ":sse41",
    ":sse42",
    ":ssse3",
    ":typeface_freetype",
    ":webp",
    ":xml",
  ]

  sources = []
  sources += skia_core_sources
  sources += skia_effects_sources
  sources += skia_sksl_sources
  sources += skia_utils_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/images/SkImageEncoder_Factory.cpp",
    "src/images/SkKTXImageEncoder.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",
      "src/xps/SkDocument_XPS.cpp",
      "src/xps/SkXPSDevice.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",
      "src/xps/SkDocument_XPS_None.cpp",
    ]
  }

  if (is_android) {
    deps += [
      "//third_party/cpu-features",
      "//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_fuchsia) {
    sources += [ "src/ports/SkDebug_stdio.cpp" ]
  }
}

skia_h_headers = exec_script("gyp/find.py",
                             [ "*.h" ] + rebase_path(skia_public_includes),
                             "list lines",
                             []) -
                 [
                   rebase_path("include/gpu/gl/GrGLConfig_chrome.h"),
                   rebase_path("include/gpu/vk/GrVkBackendContext.h"),
                   rebase_path("include/gpu/vk/GrVkDefines.h"),
                   rebase_path("include/gpu/vk/GrVkInterface.h"),
                   rebase_path("include/gpu/vk/GrVkTypes.h"),
                   rebase_path("include/ports/SkFontMgr_fontconfig.h"),
                 ]

action("skia.h") {
  script = "gn/echo_headers.py"
  args = [ rebase_path("$target_gen_dir/skia.h", root_build_dir) ] +
         rebase_path(skia_h_headers, target_gen_dir)
  inputs = skia_h_headers
  outputs = [
    "$target_gen_dir/skia.h",
  ]
}

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

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

# Targets guarded by skia_enable_tools may use //third_party freely.
if (skia_enable_tools) {
  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_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) {
        public_defines += [ "SK_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/images/SkForceLinking.cpp",
      "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",
    ]
  }

  gm_sources = exec_script("gyp/find.py",
                           [
                             "*.c*",
                             rebase_path("gm"),
                           ],
                           "list lines",
                           [])
  test_lib("gm") {
    public_include_dirs = [ "gm" ]
    sources = gm_sources
    deps = [
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
    ]
  }

  tests_sources = exec_script("gyp/find.py",
                              [
                                "*.c*",
                                rebase_path("tests"),
                              ],
                              "list lines",
                              [])

  test_lib("tests") {
    public_include_dirs = [ "tests" ]
    sources = tests_sources - [
                rebase_path("tests/PathOpsSkpClipTest.cpp"),  # alternate main
                rebase_path("tests/SkpSkGrTest.cpp"),  # doesn't compile
                rebase_path("tests/skia_test.cpp"),  # alternate main
              ]
    if (!fontmgr_android_enabled) {
      sources -= [ rebase_path("tests/FontMgrAndroidParserTest.cpp") ]
    }
    deps = [
      ":experimental_svg_model",
      ":flags",
      ":gpu_tool_utils",
      ":skia",
      ":tool_utils",
      "//third_party/libpng",
      "//third_party/zlib",
    ]
  }

  bench_sources = exec_script("gyp/find.py",
                              [
                                "*.c*",
                                rebase_path("bench"),
                              ],
                              "list lines",
                              [])

  test_lib("bench") {
    public_include_dirs = [ "bench" ]
    sources = bench_sources
    sources -= [
      rebase_path("bench/nanobench.cpp"),
      rebase_path("bench/nanobenchAndroid.cpp"),
    ]
    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/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 = []
    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" ]
    }
  }

  sample_sources = exec_script("gyp/find.py",
                               [
                                 "*.c*",
                                 rebase_path("samplecode"),
                               ],
                               "list lines",
                               [])

  test_lib("samples") {
    include_dirs = [ "experimental" ]
    public_include_dirs = [ "samplecode" ]
    sources = sample_sources
    sources -= [
      rebase_path("samplecode/SampleAnimator.cpp"),  # relies on animator
      rebase_path("samplecode/SampleApp.cpp"),  # part of SampleApp exe, not samples lib
      rebase_path("samplecode/SampleClamp.cpp"),
      rebase_path("samplecode/SampleDash.cpp"),
      rebase_path("samplecode/SampleLua.cpp"),  # no Lua yet in GN
      rebase_path("samplecode/SamplePathFill.cpp"),
      rebase_path("samplecode/SamplePictFile.cpp"),  # relies on SK_SUPPORT_LEGACY_DRAWFILTER
      rebase_path("samplecode/SampleSkLayer.cpp"),  # relies on SkMatrix44 which doesn't compile?
      rebase_path("samplecode/SampleFontCache.cpp"),  # relies on pthread.h
    ]
    sources += [
      "experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp",
      "experimental/SkSetPoly3To3.cpp",
      "experimental/SkSetPoly3To3_A.cpp",
      "experimental/SkSetPoly3To3_D.cpp",
    ]
    deps = [
      ":experimental_svg_model",
      ":gm",  # Why does SampleFilterQuality.cpp include gm.h ???
      ":tool_utils",
      ":views",
      ":xml",
    ]
  }

  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 (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 Windows.
  if (!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("skiaserve") {
    sources = [
      "tools/skiaserve/Request.cpp",
      "tools/skiaserve/Response.cpp",
      "tools/skiaserve/skiaserve.cpp",
      "tools/skiaserve/urlhandlers/BatchBoundsHandler.cpp",
      "tools/skiaserve/urlhandlers/BatchesHandler.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/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/FuzzGradients.cpp",
      "fuzz/FuzzParsePath.cpp",
      "fuzz/FuzzPathop.cpp",
      "fuzz/FuzzScaleToSides.cpp",
      "fuzz/fuzz.cpp",
    ]
    deps = [
      ":flags",
      ":skia",
    ]
    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_linux || is_win || is_mac)) {
    executable("viewer") {
      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
    }
  }
}
