This repo is dedicated to building Skia binaries for use in Skija and Skiko.
Prebuilt binaries can be found in releases.
This script will:
- check out
depot_tools
, - check out
skia
(latest commit fromchrome/$version
branch), - update submodules,
- build shared library with
skshaper
andskparagraph
modules, - produce redistributable zip.
version=m87 ./build_macos.sh
If you want to specify exact commit to build:
skia_branch=chrome/m87 skia_commit=a0c82f08df58dcd0e1d143db9ccab38f8d823b95 release=m87-a0c82f0 ./build_macos.sh
Install depot_tools
somewhere:
git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
export PATH="${PWD}/depot_tools:${PATH}"
Check out skia
:
git clone https://skia.googlesource.com/skia
cd skia
git checkout chrome/m87
Build Skia (macOS):
gn
and ninja
requires python2
for successful work
So next configuration command would be useful if you have several python distribution installed
echo 'script_executable = "python2"' >> ./third_party/skia/.gn
Run build:
python2 tools/git-sync-deps
gn gen out/Release-x64 --args="is_debug=false is_official_build=true skia_use_system_expat=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=\"x64\" extra_cflags=[\"-stdlib=libc++\", \"-mmacosx-version-min=10.9\"] extra_cflags_cc=[\"-frtti\"]"
ninja -C out/Release-x64 skia modules