# Copyright 2020 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/ohos.gni") import("../../gn/skia.gni") if (skia_enable_svg && skia_use_expat) { config("public_config") { defines = [ "SK_ENABLE_SVG" ] include_dirs = [ "include" ] if (use_oh_skia) { include_dirs += [ "//third_party/skia", "${skia_modules_dir}/svg/include", "${skia_modules_dir}/skresources/include", "${skia_modules_dir}/skshaper/include", ] } } ohos_source_set("svg") { check_includes = false import("svg.gni") public_configs = [ ":public_config" ] public = skia_svg_public sources = skia_svg_sources configs = [ "../../:skia_private" ] if (!use_oh_skia) { deps = [ "../..:skia", "../skresources", "../skshaper", ] if (is_ohos) { deps += [ "//base/hiviewdfx/hitrace/interfaces/native/innerkits:hitrace_meter", ] } } else { configs += [ "../../:skia_wno" ] } } if (skia_enable_tools) { if (defined(is_skia_standalone)) { skia_source_set("tool") { check_includes = false testonly = true configs = [ "../..:skia_private" ] sources = [ "utils/SvgTool.cpp" ] deps = [ "../..:flags", "../..:skia", ] public_deps = [ ":svg" ] } } skia_source_set("tests") { testonly = true configs = [ "../..:skia_private" ] sources = [ "tests/Filters.cpp", "tests/Text.cpp", ] deps = [ ":svg", "../..:skia", "../..:test", ] if (use_oh_skia) { deps -= [ "../..:skia" ] } } } } else { group("svg") { } group("tests") { } }