Skip to content

Commit

Permalink
cmake: print a warning if SDL version is between 2.16 and 2.20 includ…
Browse files Browse the repository at this point in the history
…ed, ref #600
  • Loading branch information
illwieckz committed Apr 3, 2022
1 parent d6cff7a commit bffa5c9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bffa5c9

Please sign in to comment.