3DS: Only bundle resources with tests that need them
(cherry picked from commit d7bb56f163
)
This commit is contained in:
parent
79a8f7b3a0
commit
b58a1c7f33
1 changed files with 3 additions and 4 deletions
|
@ -366,12 +366,11 @@ if(PSP)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(N3DS)
|
if(N3DS)
|
||||||
set(ROMFS_DIR "${CMAKE_CURRENT_BINARY_DIR}/romfs")
|
|
||||||
file(COPY ${RESOURCE_FILES} DESTINATION "${ROMFS_DIR}")
|
|
||||||
|
|
||||||
foreach(APP IN LISTS SDL_TEST_EXECUTABLES)
|
foreach(APP IN LISTS SDL_TEST_EXECUTABLES)
|
||||||
get_target_property(TARGET_BINARY_DIR ${APP} BINARY_DIR)
|
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")
|
set(SMDH_FILE "${TARGET_BINARY_DIR}/${APP}.smdh")
|
||||||
|
file(MAKE_DIRECTORY ${ROMFS_DIR})
|
||||||
ctr_generate_smdh("${SMDH_FILE}"
|
ctr_generate_smdh("${SMDH_FILE}"
|
||||||
NAME "SDL-${APP}"
|
NAME "SDL-${APP}"
|
||||||
DESCRIPTION "SDL2 Test suite"
|
DESCRIPTION "SDL2 Test suite"
|
||||||
|
@ -428,7 +427,7 @@ add_custom_target(copy-sdl-test-resources
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(APP IN LISTS SDL_TESTS_NEEDS_RESOURCES)
|
foreach(APP IN LISTS SDL_TESTS_NEEDS_RESOURCES)
|
||||||
if(PSP OR PS2)
|
if(PSP OR PS2 OR N3DS)
|
||||||
foreach(RESOURCE_FILE ${RESOURCE_FILES})
|
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})
|
add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>/sdl-${APP})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue