ci: Test cmake build script on Android

android
This commit is contained in:
Anonymous Maarten
2022-06-15 06:10:25 +02:00
committed by Sam Lantinga
parent 18206446bf
commit 86f50ae7d7
3 changed files with 60 additions and 2 deletions

View File

@@ -3,6 +3,15 @@
cmake_minimum_required(VERSION 3.12)
project(sdl_test LANGUAGES C)
if(ANDROID)
macro(add_executable NAME)
set(args ${ARGN})
list(REMOVE_ITEM args WIN32)
add_library(${NAME} SHARED ${args})
unset(args)
endmacro()
endif()
cmake_policy(SET CMP0074 NEW)
# Override CMAKE_FIND_ROOT_PATH_MODE to allow search for SDL2 outside of sysroot