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.

31 lines
1.3 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
os.vrun("git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git --depth 1")
local pathes = os.getenv("PATH")
os.addenv("PATH", path.join(os.curdir(), "depot_tools"))
os.addenv("PATH", path.join(os.curdir(), "bin"))
os.vrun("python2 tools/git-sync-deps")
6 years ago
os.vrun("bin/gn gen build --args='is_official_build=true is_debug=false'")
os.vrun("ninja -C build")
os.setenv("PATH", pathes)
6 years ago
end)
on_test(function (package)
import("lib.detect.check_cxsnippets")
assert(check_cxsnippets({test = [[
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
]]}, {configs = table.join(package:fetch(), {languages = "c++11"}), sourcekind = "cxx", includes = "core/SkPaint.h", defines = "DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN"}))
end)