From ca15cb4d679db14244f54210b723e4308b3d173f Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sat, 11 Jun 2022 02:44:12 +0200
Subject: [PATCH] Fix SDL_image version detection in VC's cmake config script
---
.../pkg-support/cmake/sdl2_image-config-version.cmake | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/VisualC/pkg-support/cmake/sdl2_image-config-version.cmake b/VisualC/pkg-support/cmake/sdl2_image-config-version.cmake
index 7fa639d3..5005bc5e 100644
--- a/VisualC/pkg-support/cmake/sdl2_image-config-version.cmake
+++ b/VisualC/pkg-support/cmake/sdl2_image-config-version.cmake
@@ -1,7 +1,7 @@
# based on the files generated by CMake's write_basic_package_version_file
-# SDL2 CMake version configuration file:
-# This file is meant to be placed in a cmake subfolder of SDL2-devel-2.x.y-VC
+# SDL2_image CMake version configuration file:
+# This file is meant to be placed in a cmake subfolder of SDL2_image-devel-2.x.y-VC
if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_image.h")
message(AUTHOR_WARNING "Could not find SDL_image.h. This script is meant to be placed in a CMake subfolder of SDL2_image-devel-2.x.y-VC")
@@ -9,11 +9,11 @@ if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL_image.h")
endif()
file(READ "${CMAKE_CURRENT_LIST_DIR}/../SDL_image.h" _sdl_image_h)
-string(REGEX MATCH "#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_image_h}")
+string(REGEX MATCH "#define[ \t]+SDL_IMAGE_MAJOR_VERSION[ \t]+([0-9]+)" _sdl_major_re "${_sdl_image_h}")
set(_sdl_major "${CMAKE_MATCH_1}")
-string(REGEX MATCH "#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_image_h}")
+string(REGEX MATCH "#define[ \t]+SDL_IMAGE_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_image_h}")
set(_sdl_minor "${CMAKE_MATCH_1}")
-string(REGEX MATCH "#define[ \t]+SDL_PATCHLEVEL[ \t]+([0-9]+)" _sdl_patch_re "${_sdl_image_h}")
+string(REGEX MATCH "#define[ \t]+SDL_IMAGE_PATCHLEVEL[ \t]+([0-9]+)" _sdl_patch_re "${_sdl_image_h}")
set(_sdl_patch "${CMAKE_MATCH_1}")
if(_sdl_major_re AND _sdl_minor_re AND _sdl_patch_re)
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_patch}")