From 2055fcacb2d7cb06dddb3f314b60d4601965d916 Mon Sep 17 00:00:00 2001 From: irov Date: Sat, 26 Aug 2023 22:19:07 +0300 Subject: [PATCH] fix android build --- cmake/Dependencies/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/Dependencies/CMakeLists.txt b/cmake/Dependencies/CMakeLists.txt index 41c8847caf..ba11f47ec0 100644 --- a/cmake/Dependencies/CMakeLists.txt +++ b/cmake/Dependencies/CMakeLists.txt @@ -679,7 +679,9 @@ if(MENGINE_DEPENDENCE_SDL) ADD_SUBDIRECTORY(${THIRDPARTY_DIR}/SDL ${THIRDPARTY_CONFIG_DIR}/SDL) - target_compile_definitions(SDL2-static PUBLIC -DSDL_MAIN_HANDLED) + if(MENGINE_TARGET_IOS OR MENGINE_TARGET_IOS_SIMULATOR) + target_compile_definitions(SDL2-static PUBLIC -DSDL_MAIN_HANDLED) + endif() set(SDL2_DIR "${THIRDPARTY_CONFIG_DIR}/SDL" CACHE STRING "SDL2_DIR" FORCE)