From cc6d3ee5635cc8bb5222ccc511bffc1821592548 Mon Sep 17 00:00:00 2001 From: Kylie C Date: Fri, 5 Sep 2025 01:44:05 -0400 Subject: [PATCH] default USE_SDL2 off --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dff8bd5c..522b3d4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,11 +55,17 @@ cmake_dependent_option(ISLE_COMPILE_SHADERS "Compile shaders" ON "SDL_SHADERCROS option(CMAKE_POSITION_INDEPENDENT_CODE "Build with -fPIC" ON) option(ENABLE_CLANG_TIDY "Enable clang-tidy") option(DOWNLOAD_DEPENDENCIES "Download dependencies" ON) -option(USE_SDL2 "Use SDL2 instead of SDL3 via a shim" ON) +option(USE_SDL2 "Use SDL2 instead of SDL3 via a shim" OFF) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" CACHE PATH "Directory where to put executables and dll") set(ISLE_EMSCRIPTEN_HOST "" CACHE STRING "Host URL for Emscripten streaming (e.g., https://test.com)") cmake_dependent_option(BUILD_SHARED_LIBS "Build lego1 as a shared library" ON "NOT EMSCRIPTEN" OFF) +if(USE_SDL2) + add_compile_definitions(SDL_MAJOR_VERSION=2) +else() + add_compile_definitions(SDL_MAJOR_VERSION=3) +endif() + message(STATUS "Isle app: ${ISLE_BUILD_APP}") message(STATUS "Config app: ${ISLE_BUILD_CONFIG}") message(STATUS "Internal DirectX5 SDK: ${ISLE_USE_DX5}")