SDL_image: project: move SDL_image.h into SDL3_image subfolder

From 56a597a421b76a1920e8ea44b2ef5e06e21c525e Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 1 Aug 2023 03:30:45 +0200
Subject: [PATCH] project: move SDL_image.h into SDL3_image subfolder

---
 .wikiheaders-options                                  |  6 +++---
 CMakeLists.txt                                        | 11 ++++++-----
 README.txt                                            |  2 +-
 VisualC-WinRT/SDL_image-UWP.vcxproj                   |  2 +-
 VisualC-WinRT/SDL_image-UWP.vcxproj.filters           |  2 +-
 VisualC/SDL_image.vcxproj                             |  2 +-
 VisualC/SDL_image.vcxproj.filters                     |  2 +-
 .../pkg-support/cmake/sdl3_image-config-version.cmake |  6 +++---
 VisualC/pkg-support/cmake/sdl3_image-config.cmake     |  2 +-
 Xcode/SDL_image.xcodeproj/project.pbxproj             |  2 +-
 build-scripts/android-prefab.sh                       |  6 +++---
 build-scripts/test-versioning.sh                      |  2 +-
 cmake/sdl3-image.pc.in                                |  2 +-
 cmake/sdlmanpages.cmake                               |  2 +-
 cmake/test/main.c                                     |  2 +-
 docs/release_checklist.md                             |  2 +-
 examples/showanim.c                                   |  2 +-
 examples/showimage.c                                  |  2 +-
 include/{SDL3 => SDL3_image}/SDL_image.h              |  0
 src/IMG.c                                             |  2 +-
 src/IMG_ImageIO.m                                     |  2 +-
 src/IMG_WIC.c                                         |  6 +++---
 src/IMG_avif.c                                        |  2 +-
 src/IMG_bmp.c                                         |  2 +-
 src/IMG_gif.c                                         |  2 +-
 src/IMG_jpg.c                                         |  2 +-
 src/IMG_jxl.c                                         |  2 +-
 src/IMG_lbm.c                                         |  2 +-
 src/IMG_pcx.c                                         |  2 +-
 src/IMG_png.c                                         |  2 +-
 src/IMG_pnm.c                                         |  2 +-
 src/IMG_qoi.c                                         |  2 +-
 src/IMG_stb.c                                         |  2 +-
 src/IMG_svg.c                                         |  2 +-
 src/IMG_tga.c                                         |  2 +-
 src/IMG_tif.c                                         |  2 +-
 src/IMG_webp.c                                        |  2 +-
 src/IMG_xcf.c                                         |  2 +-
 src/IMG_xpm.c                                         |  2 +-
 src/IMG_xv.c                                          |  2 +-
 src/IMG_xxx.c                                         |  2 +-
 test/main.c                                           |  2 +-
 42 files changed, 54 insertions(+), 53 deletions(-)
 rename include/{SDL3 => SDL3_image}/SDL_image.h (100%)

diff --git a/.wikiheaders-options b/.wikiheaders-options
index 143efc7c..005ddac3 100644
--- a/.wikiheaders-options
+++ b/.wikiheaders-options
@@ -1,10 +1,10 @@
 projectfullname = SDL_image
 projectshortname = SDL_image
-incsubdir = include/SDL3
+incsubdir = include/SDL3_image
 wikisubdir = SDL_image
 apiprefixregex = IMG_
-mainincludefname = SDL3/SDL_image.h
-versionfname = include/SDL3/SDL_image.h
+mainincludefname = SDL3_image/SDL_image.h
+versionfname = include/SDL3_image/SDL_image.h
 versionmajorregex = \A\#define\s+SDL_IMAGE_MAJOR_VERSION\s+(\d+)\Z
 versionminorregex = \A\#define\s+SDL_IMAGE_MINOR_VERSION\s+(\d+)\Z
 versionpatchregex = \A\#define\s+SDL_IMAGE_PATCHLEVEL\s+(\d+)\Z
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 960e10c6..cc9fa261 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -225,9 +225,9 @@ endif()
 target_include_directories(${sdl3_image_target_name}
     PUBLIC
         "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
-        "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/SDL3>"
+        "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/SDL3_image>"
         "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
-        "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL3>"
+        "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL3_image>"
 )
 target_compile_definitions(${sdl3_image_target_name} PRIVATE
     BUILD_SDL
@@ -237,7 +237,7 @@ target_compile_definitions(${sdl3_image_target_name} PRIVATE
 )
 target_link_libraries(${sdl3_image_target_name} PUBLIC SDL3::Headers)
 if(SDL3IMAGE_BUILD_SHARED_LIBS)
-    target_link_libraries(${sdl3_image_target_name} PUBLIC SDL3::SDL3-shared)
+    target_link_libraries(${sdl3_image_target_name} PRIVATE SDL3::SDL3-shared)
 endif()
 sdl_add_warning_options(${sdl3_image_target_name} WARNING_AS_ERROR ${SDL3IMAGE_WERROR})
 if(WIN32 AND SDL3IMAGE_BUILD_SHARED_LIBS)
@@ -711,8 +711,8 @@ if(SDL3IMAGE_INSTALL)
         RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT library
     )
     install(
-        FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SDL3/SDL_image.h"
-        DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/SDL3" COMPONENT DEVEL
+        FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/SDL3_image/SDL_image.h"
+        DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/SDL3_image" COMPONENT DEVEL
     )
 
     if(INSTALL_EXTRA_TARGETS)
@@ -783,6 +783,7 @@ if(SDL3IMAGE_INSTALL)
 
     if(SDL3IMAGE_INSTALL_MAN)
         SDL_generate_manpages(
+            HEADERS_DIR "${PROJECT_SOURCE_DIR}/include/SDL3_image"
             SYMBOL "IMG_Init"
             WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-scripts/wikiheaders.pl"
         )
diff --git a/README.txt b/README.txt
index d3193028..4a5ebc6a 100644
--- a/README.txt
+++ b/README.txt
@@ -8,7 +8,7 @@ This is a simple library to load images of various formats as SDL surfaces.
 It can load BMP, GIF, JPEG, LBM, PCX, PNG, PNM (PPM/PGM/PBM), QOI, TGA, XCF, XPM, and simple SVG format images. It can also load AVIF, JPEG-XL, TIFF, and WebP images, depending on build options (see the note below for details.)
 
 API:
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 
 	SDL_Surface *IMG_Load(const char *file);
 or
diff --git a/VisualC-WinRT/SDL_image-UWP.vcxproj b/VisualC-WinRT/SDL_image-UWP.vcxproj
index fd96d2f4..dfc3e71f 100644
--- a/VisualC-WinRT/SDL_image-UWP.vcxproj
+++ b/VisualC-WinRT/SDL_image-UWP.vcxproj
@@ -27,7 +27,7 @@
     </ProjectConfiguration>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\include\SDL3\SDL_image.h" />
+    <ClInclude Include="..\include\SDL3_image\SDL_image.h" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\SDL\VisualC-WinRT\SDL-UWP.vcxproj">
diff --git a/VisualC-WinRT/SDL_image-UWP.vcxproj.filters b/VisualC-WinRT/SDL_image-UWP.vcxproj.filters
index bb1f1723..b146dbb8 100644
--- a/VisualC-WinRT/SDL_image-UWP.vcxproj.filters
+++ b/VisualC-WinRT/SDL_image-UWP.vcxproj.filters
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <ClInclude Include="..\include\SDL3\SDL_image.h">
+    <ClInclude Include="..\include\SDL3_image\SDL_image.h">
       <Filter>Public Headers</Filter>
     </ClInclude>
   </ItemGroup>
diff --git a/VisualC/SDL_image.vcxproj b/VisualC/SDL_image.vcxproj
index f7b9b5a5..889f63a1 100644
--- a/VisualC/SDL_image.vcxproj
+++ b/VisualC/SDL_image.vcxproj
@@ -236,7 +236,7 @@
     <ResourceCompile Include="..\src\Version.rc" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\include\SDL3\SDL_image.h" />
+    <ClInclude Include="..\include\SDL3_image\SDL_image.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
diff --git a/VisualC/SDL_image.vcxproj.filters b/VisualC/SDL_image.vcxproj.filters
index 1eff54bb..86bd677a 100644
--- a/VisualC/SDL_image.vcxproj.filters
+++ b/VisualC/SDL_image.vcxproj.filters
@@ -77,7 +77,7 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\include\SDL3\SDL_image.h">
+    <ClInclude Include="..\include\SDL3_image\SDL_image.h">
       <Filter>Public Headers</Filter>
     </ClInclude>
   </ItemGroup>
diff --git a/VisualC/pkg-support/cmake/sdl3_image-config-version.cmake b/VisualC/pkg-support/cmake/sdl3_image-config-version.cmake
index 2b74891c..1cbe1c73 100644
--- a/VisualC/pkg-support/cmake/sdl3_image-config-version.cmake
+++ b/VisualC/pkg-support/cmake/sdl3_image-config-version.cmake
@@ -3,12 +3,12 @@
 # SDL3_image CMake version configuration file:
 # This file is meant to be placed in a cmake subfolder of SDL3_image-devel-3.x.y-VC
 
-if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL3/SDL_image.h")
-    message(AUTHOR_WARNING "Could not find SDL3/SDL_image.h. This script is meant to be placed in a CMake subfolder of SDL3_image-devel-3.x.y-VC")
+if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/../include/SDL3_image/SDL_image.h")
+    message(AUTHOR_WARNING "Could not find SDL3_image/SDL_image.h. This script is meant to be placed in a CMake subfolder of SDL3_image-devel-3.x.y-VC")
     return()
 endif()
 
-file(READ "${CMAKE_CURRENT_LIST_DIR}/../include/SDL3/SDL_image.h" _sdl_image_h)
+file(READ "${CMAKE_CURRENT_LIST_DIR}/../include/SDL3_image/SDL_image.h" _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_IMAGE_MINOR_VERSION[ \t]+([0-9]+)" _sdl_minor_re "${_sdl_image_h}")
diff --git a/VisualC/pkg-support/cmake/sdl3_image-config.cmake b/VisualC/pkg-support/cmake/sdl3_image-config.cmake
index 1970aa34..3e64e065 100644
--- a/VisualC/pkg-support/cmake/sdl3_image-config.cmake
+++ b/VisualC/pkg-support/cmake/sdl3_image-config.cmake
@@ -59,7 +59,7 @@ if(NOT TARGET SDL3_image::SDL3_image)
     add_library(SDL3_image::SDL3_image SHARED IMPORTED)
     set_target_properties(SDL3_image::SDL3_image
         PROPERTIES
-            INTERFACE_INCLUDE_DIRECTORIES "${_sdl3image_incdir};${_sdl3image_incdir}/SDL3"
+            INTERFACE_INCLUDE_DIRECTORIES "${_sdl3image_incdir};${_sdl3image_incdir}/SDL3_image"
             IMPORTED_IMPLIB "${_sdl3image_library}"
             IMPORTED_LOCATION "${_sdl3image_dll}"
             COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED"
diff --git a/Xcode/SDL_image.xcodeproj/project.pbxproj b/Xcode/SDL_image.xcodeproj/project.pbxproj
index 87373399..50623838 100644
--- a/Xcode/SDL_image.xcodeproj/project.pbxproj
+++ b/Xcode/SDL_image.xcodeproj/project.pbxproj
@@ -149,7 +149,7 @@
 
 /* Begin PBXFileReference section */
 		007288A60F0DA79800C302A9 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
-		1014BAEA010A4B677F000001 /* SDL_image.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_image.h; path = ../include/SDL3/SDL_image.h; sourceTree = SOURCE_ROOT; };
+		1014BAEA010A4B677F000001 /* SDL_image.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_image.h; path = ../include/SDL3_image/SDL_image.h; sourceTree = SOURCE_ROOT; };
 		61F85449145A19BC002CA294 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
 		6313BF522785566D00F268AD /* IMG_qoi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IMG_qoi.c; path = ../src/IMG_qoi.c; sourceTree = "<group>"; };
 		AA50AA461F9C7C50003B9C0C /* IMG_svg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IMG_svg.c; path = ../src/IMG_svg.c; sourceTree = "<group>"; };
diff --git a/build-scripts/android-prefab.sh b/build-scripts/android-prefab.sh
index a250b344..33a60495 100755
--- a/build-scripts/android-prefab.sh
+++ b/build-scripts/android-prefab.sh
@@ -40,9 +40,9 @@ android_api=19
 android_ndk=21
 android_stl="c++_shared"
 
-sdlimage_major=$(sed -ne 's/^#define SDL_IMAGE_MAJOR_VERSION  *//p' "${sdlimage_root}/include/SDL3/SDL_image.h")
-sdlimage_minor=$(sed -ne 's/^#define SDL_IMAGE_MINOR_VERSION  *//p' "${sdlimage_root}/include/SDL3/SDL_image.h")
-sdlimage_patch=$(sed -ne 's/^#define SDL_IMAGE_PATCHLEVEL  *//p' "${sdlimage_root}/include/SDL3/SDL_image.h")
+sdlimage_major=$(sed -ne 's/^#define SDL_IMAGE_MAJOR_VERSION  *//p' "${sdlimage_root}/include/SDL3_image/SDL_image.h")
+sdlimage_minor=$(sed -ne 's/^#define SDL_IMAGE_MINOR_VERSION  *//p' "${sdlimage_root}/include/SDL3_image/SDL_image.h")
+sdlimage_patch=$(sed -ne 's/^#define SDL_IMAGE_PATCHLEVEL  *//p' "${sdlimage_root}/include/SDL3_image/SDL_image.h")
 sdlimage_version="${sdlimage_major}.${sdlimage_minor}.${sdlimage_patch}"
 echo "Building Android prefab package for SDL_image version $sdlimage_version"
 
diff --git a/build-scripts/test-versioning.sh b/build-scripts/test-versioning.sh
index 233ef372..17b52814 100755
--- a/build-scripts/test-versioning.sh
+++ b/build-scripts/test-versioning.sh
@@ -9,7 +9,7 @@ cd `dirname $0`/..
 # Needed so sed doesn't report illegal byte sequences on macOS
 export LC_CTYPE=C
 
-header=include/SDL3/SDL_image.h
+header=include/SDL3_image/SDL_image.h
 ref_major=$(sed -ne 's/^#define SDL_IMAGE_MAJOR_VERSION  *//p' $header)
 ref_minor=$(sed -ne 's/^#define SDL_IMAGE_MINOR_VERSION  *//p' $header)
 ref_micro=$(sed -ne 's/^#define SDL_IMAGE_PATCHLEVEL  *//p' $header)
diff --git a/cmake/sdl3-image.pc.in b/cmake/sdl3-image.pc.in
index f7d3d3cc..bd286bcf 100644
--- a/cmake/sdl3-image.pc.in
+++ b/cmake/sdl3-image.pc.in
@@ -10,4 +10,4 @@ Requires: sdl3 >= @SDL_REQUIRED_VERSION@
 Libs: -L${libdir} -lSDL3_image
 Requires.private: @PC_REQUIRES@
 Libs.private: @PC_LIBS@
-Cflags: -I${includedir} -I${includedir}/SDL3
+Cflags: -I${includedir} -I${includedir}/SDL3_image
diff --git a/cmake/sdlmanpages.cmake b/cmake/sdlmanpages.cmake
index 0049de1f..f7691285 100644
--- a/cmake/sdlmanpages.cmake
+++ b/cmake/sdlmanpages.cmake
@@ -17,7 +17,7 @@ function(SDL_generate_manpages)
   endif()
 
   if(NOT ARG_HEADERS_DIR)
-    set(ARG_HEADERS_DIR "${PROJECT_SOURCE_DIR}/include/SDL3")
+    message(FATAL_ERROR "Missing required HEADERS_DIR argument")
   endif()
 
   # FIXME: get rid of SYMBOL and let the perl script figure out the dependencies
diff --git a/cmake/test/main.c b/cmake/test/main.c
index f4749ec0..22fde13c 100644
--- a/cmake/test/main.c
+++ b/cmake/test/main.c
@@ -1,6 +1,6 @@
 #include <SDL3/SDL.h>
 #include <SDL3/SDL_main.h>
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 
 int main(int argc, char *argv[])
 {
diff --git a/docs/release_checklist.md b/docs/release_checklist.md
index 22e4231d..189fd43b 100644
--- a/docs/release_checklist.md
+++ b/docs/release_checklist.md
@@ -6,7 +6,7 @@
 
 * Bump version number to 3.EVEN.0 in all these locations:
 
-    * `include/SDL3/SDL_image.h`:
+    * `include/SDL3_image/SDL_image.h`:
         `SDL_IMAGE_MAJOR_VERSION`, `SDL_IMAGE_MINOR_VERSION`, `SDL_IMAGE_PATCHLEVEL`
     * `CMakeLists.txt`:
         `MAJOR_VERSION`, `MINOR_VERSION`, `MICRO_VERSION`
diff --git a/examples/showanim.c b/examples/showanim.c
index 3b59acb5..7de1d690 100644
--- a/examples/showanim.c
+++ b/examples/showanim.c
@@ -21,7 +21,7 @@
 
 #include <SDL3/SDL.h>
 #include <SDL3/SDL_main.h>
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 
 
 /* Draw a Gimpish background pattern to show transparency in the image */
diff --git a/examples/showimage.c b/examples/showimage.c
index 80d6fe3c..d544869a 100644
--- a/examples/showimage.c
+++ b/examples/showimage.c
@@ -21,7 +21,7 @@
 
 #include <SDL3/SDL.h>
 #include <SDL3/SDL_main.h>
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 
 
 /* Draw a Gimpish background pattern to show transparency in the image */
diff --git a/include/SDL3/SDL_image.h b/include/SDL3_image/SDL_image.h
similarity index 100%
rename from include/SDL3/SDL_image.h
rename to include/SDL3_image/SDL_image.h
diff --git a/src/IMG.c b/src/IMG.c
index 3b91414a..94fbd9fb 100644
--- a/src/IMG.c
+++ b/src/IMG.c
@@ -21,7 +21,7 @@
 
 /* A simple library to load images of various formats as SDL surfaces */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef __EMSCRIPTEN__
diff --git a/src/IMG_ImageIO.m b/src/IMG_ImageIO.m
index af12f5fd..84dce6e5 100644
--- a/src/IMG_ImageIO.m
+++ b/src/IMG_ImageIO.m
@@ -9,7 +9,7 @@
 
 #if defined(__APPLE__) && !defined(SDL_IMAGE_USE_COMMON_BACKEND)
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 // Used because CGDataProviderCreate became deprecated in 10.5
diff --git a/src/IMG_WIC.c b/src/IMG_WIC.c
index 2e27258c..869f3bf8 100644
--- a/src/IMG_WIC.c
+++ b/src/IMG_WIC.c
@@ -21,7 +21,7 @@
 
 #if defined(SDL_IMAGE_USE_WIC_BACKEND)
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 #define COBJMACROS
 #include <initguid.h>
@@ -219,12 +219,12 @@ static SDL_Surface* WIC_LoadImage(SDL_RWops *src)
         IMG_SetError("WIC failed to initialize!");
         return NULL;
     }
-    
+
     Sint64 fileSize = SDL_RWsize(src);
     Uint8* memoryBuffer = (Uint8*)SDL_malloc(fileSize);
     if (!memoryBuffer) {
         SDL_OutOfMemory();
-        return NULL;  
+        return NULL;
     }
 
     if (SDL_RWread(src, memoryBuffer, fileSize) != fileSize) {
diff --git a/src/IMG_avif.c b/src/IMG_avif.c
index e5873307..8df478e2 100644
--- a/src/IMG_avif.c
+++ b/src/IMG_avif.c
@@ -21,7 +21,7 @@
 
 /* This is a AVIF image file loading framework */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_AVIF
diff --git a/src/IMG_bmp.c b/src/IMG_bmp.c
index 0b50d349..712a6405 100644
--- a/src/IMG_bmp.c
+++ b/src/IMG_bmp.c
@@ -30,7 +30,7 @@
  * http://entropymine.com/jason/bmpsuite/bmpsuite/html/bmpsuite.html
  */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_BMP
diff --git a/src/IMG_gif.c b/src/IMG_gif.c
index 7318679e..11bb7c9d 100644
--- a/src/IMG_gif.c
+++ b/src/IMG_gif.c
@@ -21,7 +21,7 @@
 
 /* This is a GIF image file loading framework */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_GIF
diff --git a/src/IMG_jpg.c b/src/IMG_jpg.c
index ebf55a5d..3bc69388 100644
--- a/src/IMG_jpg.c
+++ b/src/IMG_jpg.c
@@ -21,7 +21,7 @@
 
 /* This is a JPEG image file loading framework */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #include <stdio.h>
diff --git a/src/IMG_jxl.c b/src/IMG_jxl.c
index 2104f749..d08d924f 100644
--- a/src/IMG_jxl.c
+++ b/src/IMG_jxl.c
@@ -21,7 +21,7 @@
 
 /* This is a JXL image file loading framework */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_JXL
diff --git a/src/IMG_lbm.c b/src/IMG_lbm.c
index d1575118..e490fd53 100644
--- a/src/IMG_lbm.c
+++ b/src/IMG_lbm.c
@@ -31,7 +31,7 @@
 */
 
 #include <SDL3/SDL_endian.h>
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_LBM
diff --git a/src/IMG_pcx.c b/src/IMG_pcx.c
index 1df8e395..c904e4f1 100644
--- a/src/IMG_pcx.c
+++ b/src/IMG_pcx.c
@@ -35,7 +35,7 @@
 
 #include <SDL3/SDL_endian.h>
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_PCX
diff --git a/src/IMG_png.c b/src/IMG_png.c
index c8ba8635..05f1ca90 100644
--- a/src/IMG_png.c
+++ b/src/IMG_png.c
@@ -21,7 +21,7 @@
 
 /* This is a PNG image file loading framework */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 /* We'll have PNG save support by default */
diff --git a/src/IMG_pnm.c b/src/IMG_pnm.c
index 62013c12..6cc24884 100644
--- a/src/IMG_pnm.c
+++ b/src/IMG_pnm.c
@@ -27,7 +27,7 @@
  * Does not support: maximum component value > 255
  */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_PNM
diff --git a/src/IMG_qoi.c b/src/IMG_qoi.c
index 7b07dd6c..0d109f5c 100644
--- a/src/IMG_qoi.c
+++ b/src/IMG_qoi.c
@@ -23,7 +23,7 @@
  * https://github.com/phoboslab/qoi
  */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 #include <limits.h> /* for INT_MAX */
 
diff --git a/src/IMG_stb.c b/src/IMG_stb.c
index b012feca..0497285d 100644
--- a/src/IMG_stb.c
+++ b/src/IMG_stb.c
@@ -19,7 +19,7 @@
   3. This notice may not be removed or altered from any source distribution.
 */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef USE_STBIMAGE
diff --git a/src/IMG_svg.c b/src/IMG_svg.c
index c2cedc6d..fb57bc3f 100644
--- a/src/IMG_svg.c
+++ b/src/IMG_svg.c
@@ -23,7 +23,7 @@
  * https://github.com/memononen/nanosvg
  */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_SVG
diff --git a/src/IMG_tga.c b/src/IMG_tga.c
index 2ec57ee9..14a707e4 100644
--- a/src/IMG_tga.c
+++ b/src/IMG_tga.c
@@ -25,7 +25,7 @@
 
 #include <SDL3/SDL_endian.h>
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_TGA
diff --git a/src/IMG_tif.c b/src/IMG_tif.c
index 2ec2852c..b01e5efd 100644
--- a/src/IMG_tif.c
+++ b/src/IMG_tif.c
@@ -23,7 +23,7 @@
 
 /* This is a TIFF image file loading framework */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_TIF
diff --git a/src/IMG_webp.c b/src/IMG_webp.c
index cbab5937..8e13ea90 100644
--- a/src/IMG_webp.c
+++ b/src/IMG_webp.c
@@ -21,7 +21,7 @@
 
 /* This is a WEBP image file loading framework */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_WEBP
diff --git a/src/IMG_xcf.c b/src/IMG_xcf.c
index ac5e4e46..1617ebbf 100644
--- a/src/IMG_xcf.c
+++ b/src/IMG_xcf.c
@@ -22,7 +22,7 @@
 /* This is a XCF image file loading framework */
 
 #include <SDL3/SDL_endian.h>
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_XCF
diff --git a/src/IMG_xpm.c b/src/IMG_xpm.c
index 6703820e..d0c39409 100644
--- a/src/IMG_xpm.c
+++ b/src/IMG_xpm.c
@@ -45,7 +45,7 @@
  * requires about 13K in binary form.
  */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_XPM
diff --git a/src/IMG_xv.c b/src/IMG_xv.c
index 724aeade..caf0cf02 100644
--- a/src/IMG_xv.c
+++ b/src/IMG_xv.c
@@ -21,7 +21,7 @@
 
 /* This is a XV thumbnail image file loading framework */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_XV
diff --git a/src/IMG_xxx.c b/src/IMG_xxx.c
index e967c4ca..b49af859 100644
--- a/src/IMG_xxx.c
+++ b/src/IMG_xxx.c
@@ -21,7 +21,7 @@
 
 /* This is a generic "format not supported" image framework */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 #include "IMG.h"
 
 #ifdef LOAD_XXX
diff --git a/test/main.c b/test/main.c
index 07aa93a2..7990c5f7 100644
--- a/test/main.c
+++ b/test/main.c
@@ -11,7 +11,7 @@
   freely.
 */
 
-#include <SDL3/SDL_image.h>
+#include <SDL3_image/SDL_image.h>
 
 #include <SDL3/SDL.h>
 #include <SDL3/SDL_test.h>