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

declare_args() {
}

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 = [ "SKIA_DLL" ]
}

# 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/ports",
    "src/sfnt",
    "src/utils",
    "third_party/etc1",
    "third_party/ktx",
  ]
}

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

core_gypi = exec_script("gn/gypi_to_gn.py",
                        [
                          rebase_path("gyp/core.gypi"),
                          "--replace=<(skia_include_path)=include",
                          "--replace=<(skia_src_path)=src",
                        ],
                        "scope",
                        [ "gyp/core.gypi" ])

effects_gypi = exec_script("gn/gypi_to_gn.py",
                           [
                             rebase_path("gyp/effects.gypi"),
                             "--replace=<(skia_include_path)=include",
                             "--replace=<(skia_src_path)=src",
                           ],
                           "scope",
                           [ "gyp/effects.gypi" ])

gpu_gypi = exec_script("gn/gypi_to_gn.py",
                       [
                         rebase_path("gyp/gpu.gypi"),
                         "--replace=<(skia_include_path)=include",
                         "--replace=<(skia_src_path)=src",
                       ],
                       "scope",
                       [ "gyp/gpu.gypi" ])

opts_gypi = exec_script("gn/gypi_to_gn.py",
                        [
                          rebase_path("gyp/opts.gypi"),
                          "--replace=<(skia_include_path)=include",
                          "--replace=<(skia_src_path)=src",
                        ],
                        "scope",
                        [ "gyp/opts.gypi" ])

pdf_gypi = exec_script("gn/gypi_to_gn.py",
                       [
                         rebase_path("gyp/pdf.gypi"),
                         "--replace=<(skia_include_path)=include",
                         "--replace=<(skia_src_path)=src",
                       ],
                       "scope",
                       [ "gyp/pdf.gypi" ])

utils_gypi = exec_script("gn/gypi_to_gn.py",
                         [
                           rebase_path("gyp/utils.gypi"),
                           "--replace=<(skia_include_path)=include",
                           "--replace=<(skia_src_path)=src",
                         ],
                         "scope",
                         [ "gyp/utils.gypi" ])

source_set("opts_ssse3") {
  configs += skia_library_configs

  sources = opts_gypi.ssse3_sources
  cflags = [ "-mssse3" ]
}

source_set("opts_sse41") {
  configs += skia_library_configs

  sources = opts_gypi.sse41_sources
  cflags = [ "-msse4.1" ]
}

source_set("opts_avx") {
  configs += skia_library_configs

  sources = opts_gypi.avx_sources
  cflags = [ "-mavx" ]
}

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

  deps = [
    ":opts_avx",
    ":opts_sse41",
    ":opts_ssse3",
    "//third_party/expat",
    "//third_party/giflib",
    "//third_party/libjpeg_turbo",
    "//third_party/libpng",
    "//third_party/libwebp",
    "//third_party/zlib",
  ]

  defines = [
    "SK_HAS_GIF_LIBRARY",
    "SK_HAS_JPEG_LIBRARY",
    "SK_HAS_PNG_LIBRARY",
    "SK_HAS_WEBP_LIBRARY",
  ]

  libs = [ "pthread" ]

  sources = []
  sources += core_gypi.sources
  sources += effects_gypi.sources
  sources += gpu_gypi.skgpu_sources
  sources += opts_gypi.sse2_sources
  sources += pdf_gypi.sources
  sources += utils_gypi.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/SkIcoCodec.cpp",
    "src/codec/SkJpegCodec.cpp",
    "src/codec/SkJpegDecoderMgr.cpp",
    "src/codec/SkJpegUtility.cpp",
    "src/codec/SkMaskSwizzler.cpp",
    "src/codec/SkMasks.cpp",
    "src/codec/SkPngCodec.cpp",
    "src/codec/SkSampledCodec.cpp",
    "src/codec/SkSampler.cpp",
    "src/codec/SkSwizzler.cpp",
    "src/codec/SkWbmpCodec.cpp",
    "src/codec/SkWebpAdapterCodec.cpp",
    "src/codec/SkWebpCodec.cpp",
    "src/images/SkImageEncoder.cpp",
    "src/images/SkImageEncoder_Factory.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",
    "src/xml/SkDOM.cpp",
    "src/xml/SkXMLParser.cpp",
    "src/xml/SkXMLWriter.cpp",
    "third_party/etc1/etc1.cpp",
    "third_party/ktx/ktx.cpp",
  ]

  if (is_win) {
    sources += [
      "src/ports/SkDebug_win.cpp",
      "src/ports/SkFontHost_win.cpp",
      "src/ports/SkFontMgr_win_dw.cpp",
      "src/ports/SkFontMgr_win_dw_factory.cpp",
      "src/ports/SkImageEncoder_WIC.cpp",
      "src/ports/SkImageGeneratorWIC.cpp",
      "src/ports/SkOSFile_win.cpp",
      "src/ports/SkScalerContext_win_dw.cpp",
      "src/ports/SkTLS_win.cpp",
      "src/ports/SkTypeface_win_dw.cpp",
      "src/xps/SkDocument_XPS.cpp",
    ]
  } else {
    sources += [
      "src/ports/SkDebug_stdio.cpp",
      "src/ports/SkOSFile_posix.cpp",
      "src/ports/SkTLS_pthread.cpp",
      "src/xps/SkDocument_XPS_None.cpp",
    ]
  }

  if (is_linux) {
    deps += [
      "third_party:fontconfig",
      "third_party:freetype2",
    ]
    sources += [
      "src/fonts/SkFontMgr_fontconfig.cpp",
      "src/images/SkJPEGImageEncoder.cpp",
      "src/images/SkJPEGWriteUtility.cpp",
      "src/images/SkPNGImageEncoder.cpp",
      "src/ports/SkFontConfigInterface_direct.cpp",
      "src/ports/SkFontConfigInterface_direct_factory.cpp",
      "src/ports/SkFontHost_FreeType.cpp",
      "src/ports/SkFontHost_FreeType_common.cpp",
      "src/ports/SkFontHost_fontconfig.cpp",
    ]
  }

  if (is_mac) {
    sources += [
      "src/ports/SkFontHost_mac.cpp",
      "src/ports/SkImageEncoder_CG.cpp",
      "src/ports/SkImageGeneratorCG.cpp",
    ]
    libs += [ "ApplicationServices.framework" ]
  }

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

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

executable("fiddle") {
  include_dirs = [ "$target_gen_dir" ]
  libs = []
  if (is_linux) {
    libs += [ "OSMesa" ]
  }

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

template("test_lib") {
  config(target_name + "_config") {
    include_dirs = invoker.public_include_dirs
  }
  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 = [ "tools/gpu" ]
  sources = [
    "tools/gpu/GrContextFactory.cpp",
    "tools/gpu/GrTest.cpp",
    "tools/gpu/TestContext.cpp",
    "tools/gpu/gl/GLTestContext.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_linux) {
    sources += [ "tools/gpu/gl/glx/CreatePlatformGLTestContext_glx.cpp" ]
    libs += [
      "GL",
      "GLU",
      "X11",
    ]
  } else if (is_mac) {
    sources += [ "tools/gpu/gl/mac/CreatePlatformGLTestContext_mac.cpp" ]
    libs += [ "OpenGL.framework" ]
  }
}

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

test_lib("tool_utils") {
  public_include_dirs = [
    "tools",
    "tools/timer",
  ]
  sources = [
    "src/utils/SkMultiPictureDocumentReader.cpp",  # TODO(halcanary): move to tools?
    "tools/ProcStats.cpp",
    "tools/Resources.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 = [
    ":flags",
  ]
}

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

if (!is_component_build) {   # DM uses many non-SK_API APIs...
    executable("dm") {
      sources = [
        "dm/DM.cpp",
        "dm/DMJsonWriter.cpp",
        "dm/DMSrcSink.cpp",

        # TODO: tests for real
        "tests/Test.cpp",
      ]
      include_dirs = [ "tests" ]
      deps = [
        ":flags",
        ":gm",
        ":gpu_tool_utils",
        ":skia",
        ":tool_utils",
        "//third_party/jsoncpp",
        "//third_party/libpng",
      ]
      testonly = true
    }
}
