Skip to content

Commit

Permalink
CMake: Add WITH_SDL2 option
Browse files Browse the repository at this point in the history
This allows you to build the Qt frontend with controller support but
without building the SDL frontend
  • Loading branch information
stenzek committed Apr 7, 2020
1 parent 6c9e80c commit 1427e9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand All @@ -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)
Expand Down

0 comments on commit 1427e9f

Please sign in to comment.