Skip to content

Commit

Permalink
3DS: Only bundle resources with tests that need them
Browse files Browse the repository at this point in the history
  • Loading branch information
ccawley2011 authored and slouken committed Oct 12, 2024
1 parent 084dbb6 commit d7bb56f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,11 @@ if(PSP)
endif()

if(N3DS)
set(ROMFS_DIR "${CMAKE_CURRENT_BINARY_DIR}/romfs")
file(COPY ${RESOURCE_FILES} DESTINATION "${ROMFS_DIR}")

foreach(APP IN LISTS SDL_TEST_EXECUTABLES)
get_target_property(TARGET_BINARY_DIR ${APP} BINARY_DIR)
set(ROMFS_DIR "${TARGET_BINARY_DIR}/sdl-${APP}")
set(SMDH_FILE "${TARGET_BINARY_DIR}/${APP}.smdh")
file(MAKE_DIRECTORY ${ROMFS_DIR})
ctr_generate_smdh("${SMDH_FILE}"
NAME "SDL-${APP}"
DESCRIPTION "SDL2 Test suite"
Expand Down Expand Up @@ -461,7 +460,7 @@ add_custom_target(copy-sdl-test-resources
)

foreach(APP IN LISTS SDL_TESTS_NEEDS_RESOURCES)
if(PSP OR PS2)
if(PSP OR PS2 OR N3DS)
foreach(RESOURCE_FILE ${RESOURCE_FILES})
add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>/sdl-${APP})
endforeach()
Expand Down

0 comments on commit d7bb56f

Please sign in to comment.