diff --git a/.github/workflows/build-ios-ipa.yml b/.github/workflows/build-ios-ipa.yml index 7ca55811..475b3558 100644 --- a/.github/workflows/build-ios-ipa.yml +++ b/.github/workflows/build-ios-ipa.yml @@ -65,8 +65,11 @@ jobs: -DUNLEASHED_RECOMP_METAL=ON \ ../.. - # Generate the shader headers and binary resource sources needed by the iOS build. - cmake --build . --target UnleashedRecompShaders UnleashedRecompResources + # Generate the shader headers, binary resource sources, and PPC recompiled sources + # needed by the iOS build. UnleashedRecompPPC is generated here (host macOS config) + # because the iOS build uses UNLEASHED_RECOMP_USE_PREGENERATED_RECOMP and expects + # the ppc/* and shader/shader_cache.cpp sources to already exist on disk. + cmake --build . --target UnleashedRecompShaders UnleashedRecompResources UnleashedRecompPPC cd ../.. echo "SPIR-V headers generated successfully" diff --git a/UnleashedRecompLib/CMakeLists.txt b/UnleashedRecompLib/CMakeLists.txt index 6c66232a..57fcc3d8 100644 --- a/UnleashedRecompLib/CMakeLists.txt +++ b/UnleashedRecompLib/CMakeLists.txt @@ -93,6 +93,15 @@ if (NOT UNLEASHED_RECOMP_USE_PREGENERATED_RECOMP) ) endif() +# Custom target that only depends on the generated PPC recompiled sources and shader +# cache, without requiring the sources to be compiled. This allows a host build (e.g. +# macOS) to generate these files ahead of time for an iOS build, which relies on +# UNLEASHED_RECOMP_USE_PREGENERATED_RECOMP and does not regenerate them itself. +add_custom_target(UnleashedRecompPPC DEPENDS + ${UNLEASHED_RECOMP_PPC_RECOMPILED_SOURCES} + "${CMAKE_CURRENT_SOURCE_DIR}/shader/shader_cache.cpp" +) + add_library(UnleashedRecompLib ${UNLEASHED_RECOMP_PPC_RECOMPILED_SOURCES} "shader/shader_cache.h"