From 1427e9f097c5573e832485c17a460839ded601d5 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 7 Apr 2020 12:12:26 +1000 Subject: [PATCH] CMake: Add WITH_SDL2 option This allows you to build the Qt frontend with controller support but without building the SDL frontend --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d944b88b0..22eb5b3ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules/") if(NOT ANDROID) option(BUILD_SDL_FRONTEND "Build the SDL frontend" ON) option(BUILD_QT_FRONTEND "Build the Qt frontend" ON) + option(USE_SDL2 "Link with SDL2 for controller support" ON) endif() @@ -26,7 +27,7 @@ endif() # Required libraries. if(NOT ANDROID) - if(BUILD_SDL_FRONTEND) + if(BUILD_SDL_FRONTEND OR USE_SDL2) find_package(SDL2 REQUIRED) endif() if(BUILD_QT_FRONTEND)