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 +-- externals/SDL | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'externals') 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() diff --git a/externals/SDL b/externals/SDL index 983bbf9ef..4cd981609 160000 --- a/externals/SDL +++ b/externals/SDL @@ -1 +1 @@ -Subproject commit 983bbf9ef3e572a073a6f5877faf1c0b4803527c +Subproject commit 4cd981609b50ed273d80c635c1ca4c1e5518fb21 -- cgit v1.2.3