From bffa5c91ce256213c629c3f68d5d492155a2ab80 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Sun, 3 Apr 2022 17:14:35 +0200 Subject: [PATCH] cmake: print a warning if SDL version is between 2.16 and 2.20 included, ref #600 --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49b82e30e8..6ca71b88c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -623,8 +623,14 @@ endif() # SDL, required for all targets on win32 because of iconv and SDL_SetHint(SDL_TIMER_RESOLUTION, 0) if (BUILD_CLIENT OR WIN32) - find_package(SDL2 REQUIRED) + find_package(SDL2 REQUIRED CONFIG) include_directories(${SDL2_INCLUDE_DIR}) + + if (SDL2_VERSION VERSION_GREATER_EQUAL "2.16" + AND SDL2_VERSION VERSION_LESS_EQUAL "2.20") + message(WARNING "SDL is known to be buggy between version 2.16 and 2.20, see https://github.com/DaemonEngine/Daemon/issues/600") + endif() + if (WIN32) set(LIBS_ENGINE_BASE ${LIBS_ENGINE_BASE} ${SDL2_LIBRARY}) else()