Recorder build caching

still very much draft, just getting a few things together

Diffs=
8aed17688 add configure skia to build path for recorder
41920f475 move build skia to rive-cpp
c44f3f9bf allow building to different skia directories
diff --git a/.dockerignore b/.dockerignore
index 7500a2f..5e7b8bd 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -59,6 +59,7 @@
 build/bin
 
 # Skia dependencies
+skia/dependencies/skia_recorder
 skia/dependencies/skia
 skia/dependencies/skia_rive_optimized
 skia/dependencies/glfw_build
diff --git a/.gitignore b/.gitignore
index 72dd777..413de7a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,6 +58,7 @@
 rivinfo/build/macosx
 
 # Skia dependencies
+skia/dependencies/skia_recorder
 skia/dependencies/skia
 skia/dependencies/glfw_build
 skia/dependencies/FFmpeg
diff --git a/.rive_head b/.rive_head
index 24097cb..b2ce439 100644
--- a/.rive_head
+++ b/.rive_head
@@ -1 +1 @@
-189d4aa39438c91a1c0e2d74957c20bfa8cff855
+8aed176883c0cce64c82d48b6739718935be58d1
diff --git a/skia/dependencies/make_skia_recorder.sh b/skia/dependencies/make_skia_recorder.sh
new file mode 100755
index 0000000..9f14a9a
--- /dev/null
+++ b/skia/dependencies/make_skia_recorder.sh
@@ -0,0 +1,82 @@
+#!/bin/bash
+set -ex
+
+SKIA_REPO=https://github.com/rive-app/skia
+SKIA_BRANCH=rive
+SKIA_DIR=${SKIA_DIR:-skia}
+
+# -----------------------------
+# Get & Build Skia
+# -----------------------------
+if test -d $SKIA_DIR/.git; then
+    echo "Skia Recorder is a .git repo"
+else
+    echo "Skia Recorder is not a .git repo, probably a cache, cleaning it out"
+    rm -rf $SKIA_DIR
+fi 
+
+if [ ! -d $SKIA_DIR ]; then
+	echo "Cloning Skia recorder."
+    git clone -j8 $SKIA_REPO $SKIA_DIR
+    cd $SKIA_DIR
+    git checkout $SKIA_BRANCH
+else
+    echo "Already have Skia recorder, update it."
+    cd $SKIA_DIR
+    git checkout $SKIA_BRANCH
+    git fetch
+    git pull
+fi
+
+python tools/git-sync-deps
+
+bin/gn gen out/static --args=" \
+    is_official_build=true \
+    extra_cflags=[
+      \"-fno-rtti\",\
+      \"-DSK_DISABLE_SKPICTURE\",\
+      \"-DSK_DISABLE_TEXT\",\
+      \"-DSK_DISABLE_LEGACY_SHADERCONTEXT\",\
+      \"-DSK_DISABLE_LOWP_RASTER_PIPELINE\",\
+      \"-DSK_FORCE_RASTER_PIPELINE_BLITTER\",\
+      \"-DSK_DISABLE_AAA\",\
+      \"-DSK_DISABLE_EFFECT_DESERIALIZATION\"\
+    ] \
+    rive_use_picture=true \
+    skia_use_angle=false \
+    skia_use_dng_sdk=false \
+    skia_use_egl=false \
+    skia_use_expat=false \
+    skia_use_fontconfig=false \
+    skia_use_freetype=false \
+    skia_use_icu=false \
+    skia_use_libheif=false \
+    skia_use_system_libpng=false \
+    skia_use_system_libjpeg_turbo=false \
+    skia_use_libjpeg_turbo_encode=false \
+    skia_use_libjpeg_turbo_decode=true \
+    skia_use_libwebp_encode=false \
+    skia_use_libwebp_decode=true \
+    skia_use_system_libwebp=false \
+    skia_use_lua=false \
+    skia_use_piex=false \
+    skia_use_vulkan=false \
+    skia_use_metal=false \
+    skia_use_gl=true \
+    skia_use_zlib=true \
+    skia_use_system_zlib=false \
+    skia_enable_gpu=true \
+    skia_enable_fontmgr_empty=true \
+    skia_enable_spirv_validation=false \
+    skia_enable_pdf=false \
+    skia_use_libpng_encode = true \
+    skia_use_libpng_decode = true \
+    skia_enable_skottie = false \
+    skia_enable_tools = false \
+    skia_enable_skgpu_v1 = true \
+    skia_enable_skgpu_v2 = false \
+    "
+ninja -C out/static
+du -hs out/static/libskia.a
+
+cd ..
diff --git a/skia/renderer/build/premake5.lua b/skia/renderer/build/premake5.lua
index 303a069..ac90f28 100644
--- a/skia/renderer/build/premake5.lua
+++ b/skia/renderer/build/premake5.lua
@@ -1,6 +1,8 @@
 workspace "rive"
 configurations {"debug", "release"}
 
+SKIA_DIR = os.getenv('SKIA_DIR') or 'skia'
+
 project "rive_skia_renderer"
     kind "StaticLib"
     language "C++"
@@ -34,12 +36,12 @@
 
     filter {"system:macosx" }
         buildoptions {"-flto=full"}
-        includedirs {"../../dependencies/skia"}
-        libdirs {"../../dependencies/skia/out/static"}
+        includedirs {"../../dependencies/" .. SKIA_DIR}
+        libdirs {"../../dependencies/" .. SKIA_DIR.. "/out/static"}
 
     filter {"system:linux or windows" }
-        includedirs {"../../dependencies/skia"}
-        libdirs {"../../dependencies/skia/out/static"}
+        includedirs {"../../dependencies/" .. SKIA_DIR}
+        libdirs {"../../dependencies/" .. SKIA_DIR.. "/out/static"}
 
     filter {"system:ios" }
         buildoptions {"-flto=full"}