Skip to content

Commit d7bb56f

Browse files
ccawley2011slouken
authored andcommitted
3DS: Only bundle resources with tests that need them
1 parent 084dbb6 commit d7bb56f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,12 +399,11 @@ if(PSP)
399399
endif()
400400

401401
if(N3DS)
402-
set(ROMFS_DIR "${CMAKE_CURRENT_BINARY_DIR}/romfs")
403-
file(COPY ${RESOURCE_FILES} DESTINATION "${ROMFS_DIR}")
404-
405402
foreach(APP IN LISTS SDL_TEST_EXECUTABLES)
406403
get_target_property(TARGET_BINARY_DIR ${APP} BINARY_DIR)
404+
set(ROMFS_DIR "${TARGET_BINARY_DIR}/sdl-${APP}")
407405
set(SMDH_FILE "${TARGET_BINARY_DIR}/${APP}.smdh")
406+
file(MAKE_DIRECTORY ${ROMFS_DIR})
408407
ctr_generate_smdh("${SMDH_FILE}"
409408
NAME "SDL-${APP}"
410409
DESCRIPTION "SDL2 Test suite"
@@ -461,7 +460,7 @@ add_custom_target(copy-sdl-test-resources
461460
)
462461

463462
foreach(APP IN LISTS SDL_TESTS_NEEDS_RESOURCES)
464-
if(PSP OR PS2)
463+
if(PSP OR PS2 OR N3DS)
465464
foreach(RESOURCE_FILE ${RESOURCE_FILES})
466465
add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>/sdl-${APP})
467466
endforeach()

0 commit comments

Comments
 (0)