From 8625b535eb05ee7daab3fc82acfa9220fcb7bb77 Mon Sep 17 00:00:00 2001 From: Sergey Semushin Date: Tue, 2 Jul 2019 21:30:08 +0300 Subject: [PATCH] Workaround to allow debug build with vcpkg to work correctly. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eee7799a1..71c26b660 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,10 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 4) endif() find_package(Threads REQUIRED) -find_package(SDL2 REQUIRED) +find_package(SDL2 CONFIG QUIET) +if (NOT SDL2_FOUND) + find_package(SDL2 REQUIRED) +endif() find_package(SDL2_ttf REQUIRED) find_package(SDL2_mixer REQUIRED) find_package(sodium REQUIRED)