Exit if the FindSDL script finds 2.x instead of 1.x (#4948)

This commit is contained in:
Arne Schwabe
2017-05-23 16:46:36 +02:00
committed by Bertrand Songis
parent f462af1b0e
commit c79994d812
+3
View File
@@ -133,6 +133,9 @@ if(Qt5Core_FOUND OR FOX_FOUND)
find_package("SDL")
if(SDL_FOUND)
message(STATUS "SDL Lib: ${SDL_LIBRARY}; Headers: ${SDL_INCLUDE_DIR}; Version: ${SDL_VERSION_STRING}")
if (NOT ${SDL_VERSION_STRING} VERSION_LESS "2.0")
message(FATAL_ERROR "OpenTX requires SDL 1.x, not 2.x")
endif()
else()
message(STATUS "SDL not found! Simulator audio, and joystick inputs, will not work.")
endif()