Skip to content

Instantly share code, notes, and snippets.

@colbyn
Last active July 24, 2021 21:15
Show Gist options
  • Save colbyn/d87270bdb43a67f5571540fdda430cda to your computer and use it in GitHub Desktop.
Save colbyn/d87270bdb43a67f5571540fdda430cda to your computer and use it in GitHub Desktop.
Downloads and then compiles Skia under `./deps`
set -e
###############################################################################
# DEPS DIR
###############################################################################
DIR=$(dirname $0)
cd $DIR/../deps || (mkdir $DIR/../deps && cd $DIR/../deps && echo "/skia\n/depot_tools" > .gitignore)
###############################################################################
# SKIA DEPS
###############################################################################
cd depot_tools || (git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' && cd depot_tools)
cd ..
export PATH="${PWD}/depot_tools:${PATH}"
echo $PATH
###############################################################################
# SKIA
###############################################################################
cd skia || (git clone https://skia.googlesource.com/skia.git && cd skia)
python2 tools/git-sync-deps
gn gen out/Static --args='is_official_build=true skia_use_libwebp_decode=false skia_use_libjpeg_turbo_decode=false skia_use_libjpeg_turbo_encode=false skia_use_libwebp_encode=false extra_cflags=["-I/usr/local/opt/libjpeg/include","-I/usr/local/opt/libpng/include","-I/usr/local/opt/icu4c/include","-I/usr/local/opt/harfbuzz/include/harfbuzz"] extra_ldflags=["-L/usr/local/opt/libjpeg/lib","-L/usr/local/opt/libpng/lib","-L/usr/local/opt/icu4c/lib","-L/usr/local/opt/harfbuzz/lib"]'
ninja -C out/Static
echo "\nDONE!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment