install skia lib and fix test

pull/18/head
ruki 6 years ago
parent 944c3b61a8
commit 4625b04db7
No known key found for this signature in database
GPG Key ID: 33341DF9719963FA
  1. 11
      .travis.yml
  2. 29
      packages/s/skia/xmake.lua

@ -11,7 +11,8 @@ matrix:
- g++-4.9
env:
- MATRIX_PLAT=linux
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
- MATRIX_CC=gcc-4.9
- MATRIX_CXX=g++-4.9
- os: linux
addons:
@ -22,7 +23,8 @@ matrix:
- g++-6
env:
- MATRIX_PLAT=linux
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
- MATRIX_CC=gcc-6
- MATRIX_CXX=g++-6
- os: linux
addons:
@ -61,14 +63,15 @@ install:
fi
script:
- eval "${MATRIX_EVAL}"
- if [ "$MATRIX_PLAT" = "iphoneos" ]; then
travis_wait 60 xmake l ./scripts/test.lua -D -p iphoneos;
elif [ "$MATRIX_PLAT" = "mingw" ]; then
brew install mingw-w64;
CC="" travis_wait 60 xmake l ./scripts/test.lua -D -p mingw;
CC="" CXX="" travis_wait 60 xmake l ./scripts/test.lua -D -p mingw;
elif [ "$MATRIX_PLAT" = "android" ]; then
travis_wait 60 xmake l ./scripts/test.lua -D -p android --ndk=`pwd`/android-ndk-r19c;
elif [ "$MATRIX_PLAT" = "linux" ]; then
CC=$MATRIX_CC CXX=$MATRIX_CXX travis_wait 60 xmake l ./scripts/test.lua -D;
else
travis_wait 60 xmake l ./scripts/test.lua -D;
fi

@ -10,6 +10,25 @@ package("skia")
add_deps("python2", "ninja")
add_links("skia")
add_includedirs("include")
add_includedirs("include/android")
add_includedirs("include/atlastext")
add_includedirs("include/c")
add_includedirs("include/codec")
add_includedirs("include/config")
add_includedirs("include/core")
add_includedirs("include/docs")
add_includedirs("include/effects")
add_includedirs("include/encode")
add_includedirs("include/gpu")
add_includedirs("include/pathops")
add_includedirs("include/ports")
add_includedirs("include/private")
add_includedirs("include/svg")
add_includedirs("include/third_party")
add_includedirs("include/utils")
on_install("macosx", "linux", "windows", function (package)
local pathes = os.getenv("PATH") or ""
pathes = pathes .. path.envsep() .. path.join(os.curdir(), "depot_tools")
@ -20,6 +39,7 @@ package("skia")
skia_enable_gpu = true,
skia_enable_pdf = false,
skia_enable_nvpr = false,
skia_enable_tools = false,
skia_use_icu = false,
skia_use_sfntly = false,
skia_use_piex = false,
@ -44,11 +64,20 @@ package("skia")
os.vrun("python2 tools/git-sync-deps")
os.vrun("bin/gn gen build --args='%s'", argstr:trim())
os.vrun("ninja -C build")
os.cp("include", package:installdir())
os.cp("third_party", package:installdir())
if is_plat("windows") then
os.cp("build/*.lib", package:installdir("lib"))
else
os.cp("build/*.a", package:installdir("lib"))
end
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
static void test() {
SkPaint paint;
paint.setStyle(SkPaint::kFill_Style);
}
]]}, {configs = {languages = "c++14"}, includes = "core/SkPaint.h", defines = "DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN"}))
end)

Loading…
Cancel
Save