From c79994d8123152dadf097e3400133fe5ca59feb3 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Tue, 23 May 2017 16:46:36 +0200 Subject: [PATCH] Exit if the FindSDL script finds 2.x instead of 1.x (#4948) --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5629bc2d..c13128a8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()