package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
2.2 KiB

6 years ago
package("skia")
set_homepage("https://skia.org/")
set_description("A complete 2D graphic library for drawing Text, Geometries, and Images.")
set_urls("https://skia.googlesource.com/skia.git",
6 years ago
"https://github.com/google/skia.git")
add_versions("68046c", "68046cd7be837bd31bc8f0e821a2f82a02dda9cf")
6 years ago
add_deps("python2", "ninja")
6 years ago
on_install("macosx", "linux", "windows", function (package)
6 years ago
local pathes = os.getenv("PATH") or ""
6 years ago
pathes = pathes .. path.envsep() .. path.join(os.curdir(), "depot_tools")
pathes = pathes .. path.envsep() .. path.join(os.curdir(), "bin")
6 years ago
local args = {is_official_build = false,
is_component_build = false,
is_debug = package:debug(),
skia_enable_gpu = true,
skia_enable_pdf = false,
skia_enable_nvpr = false,
skia_use_icu = false,
skia_use_sfntly = false,
skia_use_piex = false,
skia_use_freetype = false,
skia_use_harfbuzz = false,
skia_use_libheif = false,
skia_use_expat = false,
skia_use_libjpeg_turbo = false,
skia_use_libpng = false,
skia_use_libwebp = false,
skia_use_zlib = false,
skia_use_system_expat = false,
skia_use_system_libjpeg_turbo = false,
skia_use_system_libpng = false,
skia_use_system_libwebp = false,
skia_use_system_zlib = false}
6 years ago
local argstr = ""
for k, v in pairs(args) do
argstr = argstr .. ' ' .. k .. '=' .. tostring(v)
end
6 years ago
os.vrun("python2 tools/git-sync-deps")
6 years ago
os.vrun("bin/gn gen build --args='%s'", argstr)
6 years ago
os.vrun("ninja -C build")
end)
on_test(function (package)
6 years ago
assert(package:check_cxxsnippets({test = [[
6 years ago
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
6 years ago
]]}, {configs = {languages = "c++14"}, includes = "core/SkPaint.h", defines = "DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN"}))
6 years ago
end)