add cmake option to force using the included version of SDL2
This commit is contained in:
parent
9ef9e71a46
commit
f1281295ee
1 changed files with 5 additions and 2 deletions
|
@ -3,15 +3,18 @@ cmake_minimum_required(VERSION 3.14)
|
||||||
project(doompanning)
|
project(doompanning)
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
## Create binaries in the root of the build directory
|
## Create binaries in the root of the build directory
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||||
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "ON")
|
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "ON")
|
||||||
|
|
||||||
|
option(DOOMPANNING_INTERNAL_SDL "Build and use the included version of SDL2" OFF)
|
||||||
|
|
||||||
# The SDL renderer backend in the version of ImGui included in this repo
|
# The SDL renderer backend in the version of ImGui included in this repo
|
||||||
# requires at least SDL-2.0.17. This is enforced in
|
# requires at least SDL-2.0.17. This is enforced in
|
||||||
# external/imgui/backends/imgui_impl_sdlrenderer.cpp .
|
# external/imgui/backends/imgui_impl_sdlrenderer.cpp .
|
||||||
find_package(SDL2 2.0.17)
|
if (NOT DOOMPANNING_INTERNAL_SDL)
|
||||||
|
find_package(SDL2 2.0.17)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_file(DOOM1_WAD doom1.wad HINTS /usr/share/games/doom)
|
find_file(DOOM1_WAD doom1.wad HINTS /usr/share/games/doom)
|
||||||
if (DOOM1_WAD)
|
if (DOOM1_WAD)
|
||||||
|
|
Loading…
Reference in a new issue