mirror of https://github.com/encounter/SDL.git
Make tests build for PSP and make them able to launch
This commit is contained in:
parent
cd1f24a998
commit
bf2336078c
|
@ -4,7 +4,26 @@ project(SDL2 C)
|
||||||
# Global settings for all of the test targets
|
# Global settings for all of the test targets
|
||||||
# FIXME: is this wrong?
|
# FIXME: is this wrong?
|
||||||
remove_definitions(-DUSING_GENERATED_CONFIG_H)
|
remove_definitions(-DUSING_GENERATED_CONFIG_H)
|
||||||
|
|
||||||
|
if(PSP)
|
||||||
|
link_libraries(
|
||||||
|
SDL2main
|
||||||
|
SDL2_test
|
||||||
|
SDL2-static
|
||||||
|
GL
|
||||||
|
pspvram
|
||||||
|
pspvfpu
|
||||||
|
pspdisplay
|
||||||
|
pspgu
|
||||||
|
pspge
|
||||||
|
pspaudio
|
||||||
|
pspctrl
|
||||||
|
psphprm
|
||||||
|
psppower
|
||||||
|
)
|
||||||
|
else()
|
||||||
link_libraries(SDL2_test SDL2-static)
|
link_libraries(SDL2_test SDL2-static)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WINDOWS)
|
if(WINDOWS)
|
||||||
# mingw32 must come before SDL2main to link successfully
|
# mingw32 must come before SDL2main to link successfully
|
||||||
|
@ -123,7 +142,6 @@ set(NEEDS_RESOURCES
|
||||||
testgamecontroller
|
testgamecontroller
|
||||||
testshape
|
testshape
|
||||||
testshader
|
testshader
|
||||||
testnative
|
|
||||||
testspriteminimal
|
testspriteminimal
|
||||||
testautomation
|
testautomation
|
||||||
testcustomcursor
|
testcustomcursor
|
||||||
|
@ -135,9 +153,109 @@ set(NEEDS_RESOURCES
|
||||||
testaudiohotplug
|
testaudiohotplug
|
||||||
testmultiaudio
|
testmultiaudio
|
||||||
)
|
)
|
||||||
|
if(NOT PSP)
|
||||||
|
set(NEEDS_RESOURCES ${NEEDS_RESOURCES} testnative)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(PSP)
|
||||||
|
set(BUILD_EBOOT
|
||||||
|
${NEEDS_RESOURCES}
|
||||||
|
testoffscreen
|
||||||
|
testvulkan
|
||||||
|
testbounds
|
||||||
|
testhotplug
|
||||||
|
testgles2
|
||||||
|
testhaptic
|
||||||
|
testrelative
|
||||||
|
testgl2
|
||||||
|
testsem
|
||||||
|
testdisplayinfo
|
||||||
|
testgles
|
||||||
|
teststreaming
|
||||||
|
testgeometry
|
||||||
|
testgesture
|
||||||
|
testfile
|
||||||
|
testdropfile
|
||||||
|
testdraw2
|
||||||
|
testviewport
|
||||||
|
testhittesting
|
||||||
|
checkkeys
|
||||||
|
testoverlay2
|
||||||
|
testver
|
||||||
|
testdrawchessboard
|
||||||
|
testsurround
|
||||||
|
testintersections
|
||||||
|
testmessage
|
||||||
|
testaudiocapture
|
||||||
|
testerror
|
||||||
|
testatomic
|
||||||
|
testjoystick
|
||||||
|
testrumble
|
||||||
|
testiconv
|
||||||
|
testfilesystem
|
||||||
|
testplatform
|
||||||
|
testthread
|
||||||
|
testkeys
|
||||||
|
testloadso
|
||||||
|
testmouse
|
||||||
|
testqsort
|
||||||
|
testime
|
||||||
|
testaudioinfo
|
||||||
|
testlock
|
||||||
|
checkkeysthreads
|
||||||
|
testtimer
|
||||||
|
testpower
|
||||||
|
testwm2
|
||||||
|
torturethread
|
||||||
|
)
|
||||||
|
foreach(APP IN LISTS BUILD_EBOOT)
|
||||||
|
create_pbp_file(
|
||||||
|
TARGET ${APP}
|
||||||
|
TITLE SDL-${APP}
|
||||||
|
ICON_PATH NULL
|
||||||
|
BACKGROUND_PATH NULL
|
||||||
|
PREVIEW_PATH NULL
|
||||||
|
BUILD_PRX
|
||||||
|
ENC_PRX
|
||||||
|
)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${APP} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E make_directory
|
||||||
|
$<TARGET_FILE_DIR:${ARG_TARGET}>/psp-${APP}
|
||||||
|
)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${APP} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E rename
|
||||||
|
$<TARGET_FILE_DIR:${ARG_TARGET}>/EBOOT.PBP
|
||||||
|
$<TARGET_FILE_DIR:${ARG_TARGET}>/psp-${APP}/EBOOT.PBP
|
||||||
|
)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${APP} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E rename
|
||||||
|
$<TARGET_FILE_DIR:${ARG_TARGET}>/${APP}
|
||||||
|
$<TARGET_FILE_DIR:${ARG_TARGET}>/psp-${APP}/${APP}
|
||||||
|
)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${APP} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E rename
|
||||||
|
$<TARGET_FILE_DIR:${ARG_TARGET}>/${APP}.prx
|
||||||
|
$<TARGET_FILE_DIR:${ARG_TARGET}>/psp-${APP}/${APP}.prx
|
||||||
|
)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${APP} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E remove
|
||||||
|
$<TARGET_FILE_DIR:${ARG_TARGET}>/PARAM.SFO
|
||||||
|
)
|
||||||
|
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)
|
||||||
|
add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>/psp-${APP})
|
||||||
|
else()
|
||||||
add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>)
|
add_custom_command(TARGET ${APP} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${RESOURCE_FILE} $<TARGET_FILE_DIR:${APP}>)
|
||||||
|
endif()
|
||||||
endforeach(RESOURCE_FILE)
|
endforeach(RESOURCE_FILE)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
# Make sure resource files get installed into macOS/iOS .app bundles.
|
# Make sure resource files get installed into macOS/iOS .app bundles.
|
||||||
|
|
Loading…
Reference in New Issue