From 96a175fa266e25e1ca613bd2ee1ca79fa443a599 Mon Sep 17 00:00:00 2001 From: Charlie Birks Date: Thu, 8 Sep 2022 16:46:52 +0100 Subject: [PATCH] Rework the check around find_package(SDL2) The old check was used for the macOS framework workaround, which was removed. This check should allow including a local copy of SDL2 --- 32blit-sdl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/32blit-sdl/CMakeLists.txt b/32blit-sdl/CMakeLists.txt index f1b7e21aa..805b7bb19 100644 --- a/32blit-sdl/CMakeLists.txt +++ b/32blit-sdl/CMakeLists.txt @@ -68,7 +68,7 @@ else() set(CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}" "${ANDROID_LIB_DIR}/${ANDROID_ABI}") # won't search outside this endif() - if(NOT SDL2_LIBRARIES OR NOT SDL2_INCLUDE_DIRS) + if(NOT TARGET SDL2::SDL2 AND NOT TARGET SDL2::SDL2-static) find_package(SDL2 REQUIRED) endif()