mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-01 09:27:39 +00:00
cmake: build tests as library on Android
This commit is contained in:
parent
b8b852a55b
commit
1259a60731
2 changed files with 10 additions and 1 deletions
|
@ -73,7 +73,11 @@ macro(add_sdl_test_executable TARGET)
|
|||
if(AST_NEEDS_RESOURCES)
|
||||
list(APPEND AST_SOURCES ${RESOURCE_FILES})
|
||||
endif()
|
||||
add_executable(${TARGET} ${AST_SOURCES})
|
||||
if(ANDROID)
|
||||
add_library(${TARGET} SHARED ${AST_SOURCES})
|
||||
else()
|
||||
add_executable(${TARGET} ${AST_SOURCES})
|
||||
endif()
|
||||
target_link_libraries(${TARGET} PRIVATE SDL3::SDL3_test SDL3::${sdl_name_component})
|
||||
if(AST_TESTUTILS)
|
||||
target_link_libraries(${TARGET} PRIVATE sdltests_utils)
|
||||
|
@ -204,6 +208,9 @@ add_sdl_test_executable(testgamepad NEEDS_RESOURCES TESTUTILS SOURCES testgamepa
|
|||
add_sdl_test_executable(testgeometry TESTUTILS SOURCES testgeometry.c)
|
||||
add_sdl_test_executable(testgl SOURCES testgl.c)
|
||||
add_sdl_test_executable(testgles SOURCES testgles.c)
|
||||
if(ANDROID)
|
||||
target_link_libraries(testgles PRIVATE GLESv1_CM)
|
||||
endif()
|
||||
add_sdl_test_executable(testgles2 SOURCES testgles2.c)
|
||||
add_sdl_test_executable(testgles2_sdf TESTUTILS SOURCES testgles2_sdf.c)
|
||||
add_sdl_test_executable(testhaptic SOURCES testhaptic.c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue