From 8e69df37bb1a2b86bb1a975be02fb2677332b6a0 Mon Sep 17 00:00:00 2001 From: iProgramInCpp Date: Fri, 3 Nov 2023 14:54:16 +0200 Subject: [PATCH] * Fix SDL build. --- platforms/sdl/CMakeLists.txt | 1 + source/CMakeLists.txt | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platforms/sdl/CMakeLists.txt b/platforms/sdl/CMakeLists.txt index 97d9947..5cbff6d 100644 --- a/platforms/sdl/CMakeLists.txt +++ b/platforms/sdl/CMakeLists.txt @@ -3,6 +3,7 @@ project(reminecraftpe-sdl) # SDL Build add_compile_definitions(USE_SDL USE_OPENAL HANDLE_CHARS_SEPARATELY) +set(USE_SDL 1) # WASM if(EMSCRIPTEN) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 92aede8..9fca09f 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -246,13 +246,12 @@ target_include_directories(reminecraftpe-core PUBLIC ${INCLUDES}) add_subdirectory(../thirdparty/raknet raknet) target_link_libraries(reminecraftpe-core PUBLIC raknet) -# zlib - Android targets the libraries -if(NOT ANDROID) +# zlib - Android builds with its own version +# Hack - If we're not building for Android, surely we're building with SDL +if(USE_SDL) add_subdirectory(../thirdparty/zlib zlib) target_link_libraries(reminecraftpe-core PUBLIC zlib) -endif() - -if(SDL) + # SDL add_library(SDL INTERFACE) if(EMSCRIPTEN)