Convert the test executables to AIF in RISC OS CMake builds

This commit is contained in:
Cameron Cawley 2022-05-19 23:11:22 +01:00 committed by Sam Lantinga
parent d2b5965894
commit 83ae1b4987
1 changed files with 25 additions and 4 deletions

View File

@ -386,6 +386,20 @@ if(PSP)
endforeach() endforeach()
endif() endif()
if(RISCOS)
set(ALL_TESTS_AIF "")
foreach(APP IN LISTS ALL_TESTS)
target_link_options(${APP} PRIVATE -static)
add_custom_command(
OUTPUT ${APP},ff8
COMMAND elf2aif ${APP} ${APP},ff8
DEPENDS ${APP}
)
add_custom_target(${APP}-aif ALL DEPENDS ${APP},ff8)
list(APPEND ALL_TESTS_AIF ${CMAKE_CURRENT_BINARY_DIR}/${APP},ff8)
endforeach()
endif()
foreach(APP IN LISTS NEEDS_RESOURCES) foreach(APP IN LISTS NEEDS_RESOURCES)
foreach(RESOURCE_FILE ${RESOURCE_FILES}) foreach(RESOURCE_FILE ${RESOURCE_FILES})
if(PSP) if(PSP)
@ -450,10 +464,17 @@ foreach(TESTCASE ${NONINTERACTIVE} ${NEEDS_AUDIO} ${NEEDS_DISPLAY})
endforeach() endforeach()
if(SDL_INSTALL_TESTS) if(SDL_INSTALL_TESTS)
install( if(RISCOS)
TARGETS ${ALL_TESTS} install(
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/SDL2 FILES ${ALL_TESTS_AIF}
) DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/SDL2
)
else()
install(
TARGETS ${ALL_TESTS}
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/SDL2
)
endif()
install( install(
FILES ${RESOURCE_FILES} FILES ${RESOURCE_FILES}
DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/SDL2 DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/installed-tests/SDL2