fix(build): Don't compile metal shaders for android or wasm (#13015) 19d8fb7957 Previously, we were always building the metal shaders on an Apple host, even if targeting Android or WASM. In addition to being needless bloat, this started causing issues on CI when the Xcode Metal toolchain was not present. Only build the metal shaders when needed. Co-authored-by: Chris Dalton <99840794+csmartdalton@users.noreply.github.com>
diff --git a/.rive_head b/.rive_head index 9be0836..08f49f9 100644 --- a/.rive_head +++ b/.rive_head
@@ -1 +1 @@ -e27bf13d74952314871275f26d0ed7228b97b4dc +19d8fb7957c4a37b699b530b5def3f355e2c164e
diff --git a/renderer/premake5_pls_renderer.lua b/renderer/premake5_pls_renderer.lua index ad7a6e6..44345a3 100644 --- a/renderer/premake5_pls_renderer.lua +++ b/renderer/premake5_pls_renderer.lua
@@ -247,19 +247,19 @@ makecommand = makecommand .. ' FLAGS="' .. minify_flags .. '"' if os.host() == 'macosx' then - if _OPTIONS['os'] == 'ios' and _OPTIONS['variant'] == 'system' then + if rive_target_os == 'ios' and _OPTIONS['variant'] == 'system' then makecommand = makecommand .. ' rive_pls_ios_metallib' - elseif _OPTIONS['os'] == 'ios' and _OPTIONS['variant'] == 'emulator' then + elseif rive_target_os == 'ios' and _OPTIONS['variant'] == 'emulator' then makecommand = makecommand .. ' rive_pls_ios_simulator_metallib' - elseif _OPTIONS['os'] == 'ios' and _OPTIONS['variant'] == 'xros' then + elseif rive_target_os == 'ios' and _OPTIONS['variant'] == 'xros' then makecommand = makecommand .. ' rive_renderer_xros_metallib' - elseif _OPTIONS['os'] == 'ios' and _OPTIONS['variant'] == 'xrsimulator' then + elseif rive_target_os == 'ios' and _OPTIONS['variant'] == 'xrsimulator' then makecommand = makecommand .. ' rive_renderer_xros_simulator_metallib' - elseif _OPTIONS['os'] == 'ios' and _OPTIONS['variant'] == 'appletvos' then + elseif rive_target_os == 'ios' and _OPTIONS['variant'] == 'appletvos' then makecommand = makecommand .. ' rive_renderer_appletvos_metallib' - elseif _OPTIONS['os'] == 'ios' and _OPTIONS['variant'] == 'appletvsimulator' then + elseif rive_target_os == 'ios' and _OPTIONS['variant'] == 'appletvsimulator' then makecommand = makecommand .. ' rive_renderer_appletvsimulator_metallib' - else + elseif rive_target_os == 'macosx' then makecommand = makecommand .. ' rive_pls_macosx_metallib' end end