From baaac5cca3d025031a51624af8d13f197e81b89c Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Thu, 23 Nov 2023 03:39:36 +0100 Subject: [PATCH] cmake: Android expects SDL programs to be built as shared libraries --- test/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 07ebf3426..f80995de7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -11,7 +11,11 @@ set(SDL_TESTS_NEEDS_ESOURCES) macro(add_sdl_test_executable TARGET) cmake_parse_arguments(AST "NONINTERACTIVE;NEEDS_RESOURCES" "" "" ${ARGN}) - add_executable(${TARGET} ${AST_UNPARSED_ARGUMENTS}) + if(ANDROID) + add_library(${TARGET} SHARED ${AST_UNPARSED_ARGUMENTS}) + else() + add_executable(${TARGET} ${AST_UNPARSED_ARGUMENTS}) + endif() list(APPEND SDL_TEST_EXECUTABLES ${TARGET}) if(AST_NONINTERACTIVE)