diff --git a/runtime/runtime.cmake b/runtime/runtime.cmake index ec1f18a4..70d94d5f 100644 --- a/runtime/runtime.cmake +++ b/runtime/runtime.cmake @@ -801,6 +801,13 @@ function(psxrecomp_add_runtime_target target) # to; copy_directory merges rather than replacing the tree. if(EXISTS "${PSXRECOMP_ROOT}/mods/builtin/packages") add_custom_command(TARGET ${target} POST_BUILD + # Clear first: copy_directory MERGES, so a mod deleted from source + # would otherwise survive in the build output forever and keep + # appearing on the Mods page (and inflate the release packagers' + # catalog assertions). This runs before the game's own staging, so + # both catalogs land on a clean slate. + COMMAND ${CMAKE_COMMAND} -E rm -rf + "$/mods" COMMAND ${CMAKE_COMMAND} -E copy_directory "${PSXRECOMP_ROOT}/mods/builtin" "$/mods"