From de69a5266fde93a793fc3664db205ec7bad3e9a9 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sat, 17 Apr 2021 23:35:13 -0400 Subject: cmake: Use SDL 2.0.14 and fix CMake scope issue Forces using SDL 2.0.14. Upgrades the SDL external to that version. Adds a message when switching to the external. Fixes an error where input_common only links to SDL when SDL2_FOUND is set, but externals/CMakeLists cannot set that variable to the required scope. Switch to using ENABLE_SDL2, which we can use since we now include the SDL source. --- externals/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'externals/CMakeLists.txt') diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt index 6e4591b4e..e044d9730 100644 --- a/externals/CMakeLists.txt +++ b/externals/CMakeLists.txt @@ -46,8 +46,7 @@ add_library(unicorn-headers INTERFACE) target_include_directories(unicorn-headers INTERFACE ./unicorn/include) # SDL2 -if (NOT SDL2_FOUND) - set(SDL2_FOUND YES) +if (NOT SDL2_FOUND AND ENABLE_SDL2) add_subdirectory(SDL EXCLUDE_FROM_ALL) endif() -- cgit v1.2.3