Skip to content

Commit b58a1c7

Browse files
ccawley2011slouken
authored andcommitted
3DS: Only bundle resources with tests that need them
(cherry picked from commit d7bb56f)
1 parent 79a8f7b commit b58a1c7

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
@@ -366,12 +366,11 @@ if(PSP)
366366
endif()
367367

368368
if(N3DS)
369-
set(ROMFS_DIR "${CMAKE_CURRENT_BINARY_DIR}/romfs")
370-
file(COPY ${RESOURCE_FILES} DESTINATION "${ROMFS_DIR}")
371-
372369
foreach(APP IN LISTS SDL_TEST_EXECUTABLES)
373370
get_target_property(TARGET_BINARY_DIR ${APP} BINARY_DIR)
371+
set(ROMFS_DIR "${TARGET_BINARY_DIR}/sdl-${APP}")
374372
set(SMDH_FILE "${TARGET_BINARY_DIR}/${APP}.smdh")
373+
file(MAKE_DIRECTORY ${ROMFS_DIR})
375374
ctr_generate_smdh("${SMDH_FILE}"
376375
NAME "SDL-${APP}"
377376
DESCRIPTION "SDL2 Test suite"
@@ -428,7 +427,7 @@ add_custom_target(copy-sdl-test-resources
428427
)
429428

430429
foreach(APP IN LISTS SDL_TESTS_NEEDS_RESOURCES)
431-
if(PSP OR PS2)
430+
if(PSP OR PS2 OR N3DS)
432431
foreach(RESOURCE_FILE ${RESOURCE_FILES})
433432
add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>/sdl-${APP})
434433
endforeach()

0 commit comments

Comments
 (0)