SDL_image: Move sources and documentation in subfolders (f3992)

From f399267d0b24f6aab9754f7bb207d71cf4dc9eb2 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Tue, 20 Jun 2023 20:09:34 +0200
Subject: [PATCH] Move sources and documentation in subfolders

---
 .editorconfig                                 |   6 +
 .github/workflows/main.yml                    |   2 +-
 Android.mk                                    |  46 +++---
 CMakeLists.txt                                |  65 ++++----
 README.txt                                    |   2 +-
 VisualC-WinRT/SDL_image-UWP.vcxproj           |  54 +++----
 VisualC-WinRT/SDL_image-UWP.vcxproj.filters   |  44 ++---
 VisualC/SDL_image.vcxproj                     |  54 +++----
 VisualC/SDL_image.vcxproj.filters             |  46 +++---
 Xcode/SDL_image.xcodeproj/project.pbxproj     |  42 ++---
 .../test-versioning.sh                        |   4 +-
 .../README-emscripten.txt                     |   0
 README-versions.md => docs/README-versions.md |   0
 .../release_checklist.md                      |  16 +-
 showanim.c => examples/showanim.c             |   0
 showimage.c => examples/showimage.c           |   0
 IMG.c => src/IMG.c                            |   0
 IMG.h => src/IMG.h                            |   0
 IMG_ImageIO.m => src/IMG_ImageIO.m            |   0
 IMG_WIC.c => src/IMG_WIC.c                    |   0
 IMG_avif.c => src/IMG_avif.c                  |   0
 IMG_bmp.c => src/IMG_bmp.c                    |   0
 IMG_gif.c => src/IMG_gif.c                    |   0
 IMG_jpg.c => src/IMG_jpg.c                    |   0
 IMG_jxl.c => src/IMG_jxl.c                    |   0
 IMG_lbm.c => src/IMG_lbm.c                    |   0
 IMG_pcx.c => src/IMG_pcx.c                    |   0
 IMG_png.c => src/IMG_png.c                    |   0
 IMG_pnm.c => src/IMG_pnm.c                    |   0
 IMG_qoi.c => src/IMG_qoi.c                    |   0
 IMG_stb.c => src/IMG_stb.c                    |   0
 IMG_svg.c => src/IMG_svg.c                    |   0
 IMG_tga.c => src/IMG_tga.c                    |   0
 IMG_tif.c => src/IMG_tif.c                    |   0
 IMG_webp.c => src/IMG_webp.c                  |   0
 IMG_xcf.c => src/IMG_xcf.c                    |   0
 IMG_xpm.c => src/IMG_xpm.c                    |   0
 IMG_xv.c => src/IMG_xv.c                      |   0
 IMG_xxx.c => src/IMG_xxx.c                    |   0
 SDL_image.sym => src/SDL_image.sym            |   0
 miniz.h => src/miniz.h                        |   0
 nanosvg.h => src/nanosvg.h                    |   0
 nanosvgrast.h => src/nanosvgrast.h            |   0
 qoi.h => src/qoi.h                            |   0
 stb_image.h => src/stb_image.h                |   0
 tiny_jpeg.h => src/tiny_jpeg.h                |   0
 version.rc => src/version.rc                  |   0
 test-driver                                   | 153 ------------------
 48 files changed, 194 insertions(+), 340 deletions(-)
 rename test-versioning.sh => build-scripts/test-versioning.sh (98%)
 rename README-emscripten.txt => docs/README-emscripten.txt (100%)
 rename README-versions.md => docs/README-versions.md (100%)
 rename release_checklist.md => docs/release_checklist.md (86%)
 rename showanim.c => examples/showanim.c (100%)
 rename showimage.c => examples/showimage.c (100%)
 rename IMG.c => src/IMG.c (100%)
 rename IMG.h => src/IMG.h (100%)
 rename IMG_ImageIO.m => src/IMG_ImageIO.m (100%)
 rename IMG_WIC.c => src/IMG_WIC.c (100%)
 rename IMG_avif.c => src/IMG_avif.c (100%)
 rename IMG_bmp.c => src/IMG_bmp.c (100%)
 rename IMG_gif.c => src/IMG_gif.c (100%)
 rename IMG_jpg.c => src/IMG_jpg.c (100%)
 rename IMG_jxl.c => src/IMG_jxl.c (100%)
 rename IMG_lbm.c => src/IMG_lbm.c (100%)
 rename IMG_pcx.c => src/IMG_pcx.c (100%)
 rename IMG_png.c => src/IMG_png.c (100%)
 rename IMG_pnm.c => src/IMG_pnm.c (100%)
 rename IMG_qoi.c => src/IMG_qoi.c (100%)
 rename IMG_stb.c => src/IMG_stb.c (100%)
 rename IMG_svg.c => src/IMG_svg.c (100%)
 rename IMG_tga.c => src/IMG_tga.c (100%)
 rename IMG_tif.c => src/IMG_tif.c (100%)
 rename IMG_webp.c => src/IMG_webp.c (100%)
 rename IMG_xcf.c => src/IMG_xcf.c (100%)
 rename IMG_xpm.c => src/IMG_xpm.c (100%)
 rename IMG_xv.c => src/IMG_xv.c (100%)
 rename IMG_xxx.c => src/IMG_xxx.c (100%)
 rename SDL_image.sym => src/SDL_image.sym (100%)
 rename miniz.h => src/miniz.h (100%)
 rename nanosvg.h => src/nanosvg.h (100%)
 rename nanosvgrast.h => src/nanosvgrast.h (100%)
 rename qoi.h => src/qoi.h (100%)
 rename stb_image.h => src/stb_image.h (100%)
 rename tiny_jpeg.h => src/tiny_jpeg.h (100%)
 rename version.rc => src/version.rc (100%)
 delete mode 100755 test-driver

diff --git a/.editorconfig b/.editorconfig
index 2e270580..b581ae16 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,3 +7,9 @@ end_of_line = lf
 indent_size = 4
 insert_final_newline = true
 trim_trailing_whitespace = true
+
+[README.txt]
+end_of_line = crlf
+
+[*.{filters,sln,vcxproj}]
+end_of_line = crlf
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 087e81c8..238887a4 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -95,7 +95,7 @@ jobs:
     - name: Check that versioning is consistent
       # We only need to run this once: arbitrarily use the Linux build
       if: "runner.os == 'Linux'"
-      run: ./test-versioning.sh
+      run: ./build-scripts/test-versioning.sh
 
     - name: Setup
       if: ${{ !matrix.platform.msystem && !matrix.platform.msvc }}
diff --git a/Android.mk b/Android.mk
index 6b2c8ace..3c68f4c9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -71,34 +71,34 @@ include $(CLEAR_VARS)
 LOCAL_MODULE := SDL3_image
 
 LOCAL_SRC_FILES :=  \
-    IMG.c           \
-    IMG_avif.c      \
-    IMG_bmp.c       \
-    IMG_gif.c       \
-    IMG_jpg.c       \
-    IMG_jxl.c       \
-    IMG_lbm.c       \
-    IMG_pcx.c       \
-    IMG_png.c       \
-    IMG_pnm.c       \
-    IMG_qoi.c       \
-    IMG_stb.c       \
-    IMG_svg.c       \
-    IMG_tga.c       \
-    IMG_tif.c       \
-    IMG_webp.c      \
-    IMG_WIC.c       \
-    IMG_xcf.c       \
-    IMG_xpm.c.arm   \
-    IMG_xv.c
-
-LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
+    src/IMG.c           \
+    src/IMG_avif.c      \
+    src/IMG_bmp.c       \
+    src/IMG_gif.c       \
+    src/IMG_jpg.c       \
+    src/IMG_jxl.c       \
+    src/IMG_lbm.c       \
+    src/IMG_pcx.c       \
+    src/IMG_png.c       \
+    src/IMG_pnm.c       \
+    src/IMG_qoi.c       \
+    src/IMG_stb.c       \
+    src/IMG_svg.c       \
+    src/IMG_tga.c       \
+    src/IMG_tif.c       \
+    src/IMG_webp.c      \
+    src/IMG_WIC.c       \
+    src/IMG_xcf.c       \
+    src/IMG_xpm.c.arm   \
+    src/IMG_xv.c
+
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src $(LOCAL_PATH)/include
 
 LOCAL_CFLAGS := -DLOAD_BMP -DLOAD_GIF -DLOAD_LBM -DLOAD_PCX -DLOAD_PNM \
                 -DLOAD_SVG -DLOAD_TGA -DLOAD_XCF -DLOAD_XPM -DLOAD_XV  \
                 -DLOAD_QOI
 LOCAL_LDLIBS :=
-LOCAL_LDFLAGS := -Wl,--no-undefined -Wl,--version-script=$(LOCAL_PATH)/SDL_image.sym
+LOCAL_LDFLAGS := -Wl,--no-undefined -Wl,--version-script=$(LOCAL_PATH)/src/SDL_image.sym
 LOCAL_STATIC_LIBRARIES :=
 LOCAL_SHARED_LIBRARIES := SDL3
 
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 510b95a2..cd15cc5c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,37 +185,40 @@ endif()
 
 set(BUILD_SHARED_LIBS ${SDL3IMAGE_BUILD_SHARED_LIBS})
 add_library(${sdl3_image_target_name}
-    IMG.c
-    IMG_WIC.c
-    IMG_avif.c
-    IMG_bmp.c
-    IMG_gif.c
-    IMG_jpg.c
-    IMG_jxl.c
-    IMG_lbm.c
-    IMG_pcx.c
-    IMG_png.c
-    IMG_pnm.c
-    IMG_qoi.c
-    IMG_stb.c
-    IMG_svg.c
-    IMG_tga.c
-    IMG_tif.c
-    IMG_webp.c
-    IMG_xcf.c
-    IMG_xpm.c
-    IMG_xv.c
-    IMG_xxx.c
+    src/IMG.c
+    src/IMG_WIC.c
+    src/IMG_avif.c
+    src/IMG_bmp.c
+    src/IMG_gif.c
+    src/IMG_jpg.c
+    src/IMG_jxl.c
+    src/IMG_lbm.c
+    src/IMG_pcx.c
+    src/IMG_png.c
+    src/IMG_pnm.c
+    src/IMG_qoi.c
+    src/IMG_stb.c
+    src/IMG_svg.c
+    src/IMG_tga.c
+    src/IMG_tif.c
+    src/IMG_webp.c
+    src/IMG_xcf.c
+    src/IMG_xpm.c
+    src/IMG_xv.c
+    src/IMG_xxx.c
 )
 add_library(SDL3_image::${sdl3_image_target_name} ALIAS ${sdl3_image_target_name})
 if(NOT TARGET SDL3_image::SDL3_image)
     add_library(SDL3_image::SDL3_image ALIAS ${sdl3_image_target_name})
 endif()
-target_include_directories(${sdl3_image_target_name} PUBLIC
-    "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
-    "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/SDL3>"
-    "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
-    "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL3>"
+target_include_directories(${sdl3_image_target_name}
+    PUBLIC
+        "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
+        "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/SDL3>"
+        "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
+        "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL3>"
+    PRIVATE
+        "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
 )
 target_compile_definitions(${sdl3_image_target_name} PRIVATE
     BUILD_SDL
@@ -227,7 +230,7 @@ target_link_libraries(${sdl3_image_target_name} PRIVATE $<BUILD_INTERFACE:${sdl3
 sdl_add_warning_options(${sdl3_image_target_name} WARNING_AS_ERROR ${SDL3IMAGE_WERROR})
 if(WIN32 AND SDL3IMAGE_BUILD_SHARED_LIBS)
     target_sources(${sdl3_image_target_name} PRIVATE
-        version.rc
+        src/version.rc
     )
 endif()
 set_target_properties(${sdl3_image_target_name} PROPERTIES
@@ -237,7 +240,7 @@ set_target_properties(${sdl3_image_target_name} PROPERTIES
     C_VISIBILITY_PRESET "hidden"
 )
 
-sdl_target_link_option_version_file(${sdl3_image_target_name} "${CMAKE_CURRENT_SOURCE_DIR}/SDL_image.sym")
+sdl_target_link_option_version_file(${sdl3_image_target_name} "${CMAKE_CURRENT_SOURCE_DIR}/src/SDL_image.sym")
 
 if(NOT ANDROID)
     if(APPLE)
@@ -296,7 +299,7 @@ if(APPLE)
         target_link_libraries(${sdl3_image_target_name} PRIVATE -Wl,-framework,ApplicationServices)
         target_link_libraries(${sdl3_image_target_name} PRIVATE objc)
         target_sources(${sdl3_image_target_name} PRIVATE
-            IMG_ImageIO.m
+            src/IMG_ImageIO.m
         )
 
         if (SDL3IMAGE_PNG AND NOT SDL3IMAGE_BACKEND_STB)
@@ -762,8 +765,8 @@ if(SDL3IMAGE_INSTALL)
 endif()
 
 if(SDL3IMAGE_SAMPLES)
-    add_executable(showanim showanim.c)
-    add_executable(showimage showimage.c)
+    add_executable(showanim examples/showanim.c)
+    add_executable(showimage examples/showimage.c)
 
     foreach(prog showanim showimage)
         sdl_add_warning_options(${prog} WARNING_AS_ERROR ${SDL3IMAGE_WERROR})
diff --git a/README.txt b/README.txt
index da16e12e..e81c7936 100644
--- a/README.txt
+++ b/README.txt
@@ -23,7 +23,7 @@ To create a surface from an XPM image included in C source, use:
 
 	SDL_Surface *IMG_ReadXPMFromArray(char **xpm);
 
-An example program 'showimage' is included, with source in showimage.c
+An example program 'showimage' is included, with source in examples/showimage.c
 
 Documentation is also available online at https://wiki.libsdl.org/SDL_image
 
diff --git a/VisualC-WinRT/SDL_image-UWP.vcxproj b/VisualC-WinRT/SDL_image-UWP.vcxproj
index b8b65c1e..b7470539 100644
--- a/VisualC-WinRT/SDL_image-UWP.vcxproj
+++ b/VisualC-WinRT/SDL_image-UWP.vcxproj
@@ -27,7 +27,7 @@
     </ProjectConfiguration>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\SDL_image.h" />
+    <ClInclude Include="..\include\SDL3\SDL_image.h" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\..\SDL\VisualC-WinRT\SDL-UWP.vcxproj">
@@ -35,26 +35,26 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\IMG.c" />
-    <ClCompile Include="..\IMG_avif.c" />
-    <ClCompile Include="..\IMG_bmp.c" />
-    <ClCompile Include="..\IMG_gif.c" />
-    <ClCompile Include="..\IMG_jpg.c" />
-    <ClCompile Include="..\IMG_jxl.c" />
-    <ClCompile Include="..\IMG_lbm.c" />
-    <ClCompile Include="..\IMG_pcx.c" />
-    <ClCompile Include="..\IMG_png.c" />
-    <ClCompile Include="..\IMG_pnm.c" />
-    <ClCompile Include="..\IMG_qoi.c" />
-    <ClCompile Include="..\IMG_stb.c" />
-    <ClCompile Include="..\IMG_svg.c" />
-    <ClCompile Include="..\IMG_tga.c" />
-    <ClCompile Include="..\IMG_tif.c" />
-    <ClCompile Include="..\IMG_webp.c" />
-    <ClCompile Include="..\IMG_WIC.c" />
-    <ClCompile Include="..\IMG_xcf.c" />
-    <ClCompile Include="..\IMG_xpm.c" />
-    <ClCompile Include="..\IMG_xv.c" />
+    <ClCompile Include="..\src\IMG.c" />
+    <ClCompile Include="..\src\IMG_avif.c" />
+    <ClCompile Include="..\src\IMG_bmp.c" />
+    <ClCompile Include="..\src\IMG_gif.c" />
+    <ClCompile Include="..\src\IMG_jpg.c" />
+    <ClCompile Include="..\src\IMG_jxl.c" />
+    <ClCompile Include="..\src\IMG_lbm.c" />
+    <ClCompile Include="..\src\IMG_pcx.c" />
+    <ClCompile Include="..\src\IMG_png.c" />
+    <ClCompile Include="..\src\IMG_pnm.c" />
+    <ClCompile Include="..\src\IMG_qoi.c" />
+    <ClCompile Include="..\src\IMG_stb.c" />
+    <ClCompile Include="..\src\IMG_svg.c" />
+    <ClCompile Include="..\src\IMG_tga.c" />
+    <ClCompile Include="..\src\IMG_tif.c" />
+    <ClCompile Include="..\src\IMG_webp.c" />
+    <ClCompile Include="..\src\IMG_WIC.c" />
+    <ClCompile Include="..\src\IMG_xcf.c" />
+    <ClCompile Include="..\src\IMG_xpm.c" />
+    <ClCompile Include="..\src\IMG_xv.c" />
   </ItemGroup>
   <PropertyGroup Label="Globals">
     <ProjectGuid>{18665277-e558-4484-93f4-e4dc7bb614cb}</ProjectGuid>
@@ -158,7 +158,7 @@
     <ClCompile>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <CompileAsWinRT>false</CompileAsWinRT>
-      <AdditionalIncludeDirectories>..\include;..\src;..\src\codecs;..\src\codecs\timidity;..\external\ogg\include;..\external\vorbis\include;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\include;..\src;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>USE_STBIMAGE;LOAD_BMP;LOAD_GIF;LOAD_JPG;LOAD_LBM;LOAD_PCX;LOAD_PNG;LOAD_PNM;LOAD_QOI;LOAD_SVG;LOAD_TGA;LOAD_XPM;LOAD_XV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
@@ -171,7 +171,7 @@
     <ClCompile>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <CompileAsWinRT>false</CompileAsWinRT>
-      <AdditionalIncludeDirectories>..\include;..\src;..\src\codecs;..\src\codecs\timidity;..\external\ogg\include;..\external\vorbis\include;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\include;..\src;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>NDEBUG;USE_STBIMAGE;LOAD_BMP;LOAD_GIF;LOAD_JPG;LOAD_LBM;LOAD_PCX;LOAD_PNG;LOAD_PNM;LOAD_QOI;LOAD_SVG;LOAD_TGA;LOAD_XPM;LOAD_XV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
@@ -184,7 +184,7 @@
     <ClCompile>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <CompileAsWinRT>false</CompileAsWinRT>
-      <AdditionalIncludeDirectories>..\include;..\src;..\src\codecs;..\src\codecs\timidity;..\external\ogg\include;..\external\vorbis\include;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\include;..\src;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>USE_STBIMAGE;LOAD_BMP;LOAD_GIF;LOAD_JPG;LOAD_LBM;LOAD_PCX;LOAD_PNG;LOAD_PNM;LOAD_QOI;LOAD_SVG;LOAD_TGA;LOAD_XPM;LOAD_XV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
@@ -197,7 +197,7 @@
     <ClCompile>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <CompileAsWinRT>false</CompileAsWinRT>
-      <AdditionalIncludeDirectories>..\include;..\src;..\src\codecs;..\src\codecs\timidity;..\external\ogg\include;..\external\vorbis\include;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\include;..\src;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>NDEBUG;USE_STBIMAGE;LOAD_BMP;LOAD_GIF;LOAD_JPG;LOAD_LBM;LOAD_PCX;LOAD_PNG;LOAD_PNM;LOAD_QOI;LOAD_SVG;LOAD_TGA;LOAD_XPM;LOAD_XV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
@@ -210,7 +210,7 @@
     <ClCompile>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <CompileAsWinRT>false</CompileAsWinRT>
-      <AdditionalIncludeDirectories>..\include;..\src;..\src\codecs;..\src\codecs\timidity;..\external\ogg\include;..\external\vorbis\include;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\include;..\src;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>USE_STBIMAGE;LOAD_BMP;LOAD_GIF;LOAD_JPG;LOAD_LBM;LOAD_PCX;LOAD_PNG;LOAD_PNM;LOAD_QOI;LOAD_SVG;LOAD_TGA;LOAD_XPM;LOAD_XV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
@@ -223,7 +223,7 @@
     <ClCompile>
       <PrecompiledHeader>NotUsing</PrecompiledHeader>
       <CompileAsWinRT>false</CompileAsWinRT>
-      <AdditionalIncludeDirectories>..\include;..\src;..\src\codecs;..\src\codecs\timidity;..\external\ogg\include;..\external\vorbis\include;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\include;..\src;..\..\SDL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>NDEBUG;USE_STBIMAGE;LOAD_BMP;LOAD_GIF;LOAD_JPG;LOAD_LBM;LOAD_PCX;LOAD_PNG;LOAD_PNM;LOAD_QOI;LOAD_SVG;LOAD_TGA;LOAD_XPM;LOAD_XV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
     <Link>
diff --git a/VisualC-WinRT/SDL_image-UWP.vcxproj.filters b/VisualC-WinRT/SDL_image-UWP.vcxproj.filters
index 2e02b330..bb1f1723 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="..\SDL_image.h">
+    <ClInclude Include="..\include\SDL3\SDL_image.h">
       <Filter>Public Headers</Filter>
     </ClInclude>
   </ItemGroup>
@@ -14,65 +14,65 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\IMG.c">
+    <ClCompile Include="..\src\IMG.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_avif.c">
+    <ClCompile Include="..\src\IMG_avif.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_bmp.c">
+    <ClCompile Include="..\src\IMG_bmp.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_gif.c">
+    <ClCompile Include="..\src\IMG_gif.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_jpg.c">
+    <ClCompile Include="..\src\IMG_jpg.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_jxl.c">
+    <ClCompile Include="..\src\IMG_jxl.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_lbm.c">
+    <ClCompile Include="..\src\IMG_lbm.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_pcx.c">
+    <ClCompile Include="..\src\IMG_pcx.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_png.c">
+    <ClCompile Include="..\src\IMG_png.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_pnm.c">
+    <ClCompile Include="..\src\IMG_pnm.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_qoi.c">
+    <ClCompile Include="..\src\IMG_qoi.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_stb.c">
+    <ClCompile Include="..\src\IMG_stb.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_svg.c">
+    <ClCompile Include="..\src\IMG_svg.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_tga.c">
+    <ClCompile Include="..\src\IMG_tga.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_tif.c">
+    <ClCompile Include="..\src\IMG_tif.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_webp.c">
+    <ClCompile Include="..\src\IMG_webp.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_WIC.c">
+    <ClCompile Include="..\src\IMG_WIC.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_xcf.c">
+    <ClCompile Include="..\src\IMG_xcf.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_xpm.c">
+    <ClCompile Include="..\src\IMG_xpm.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_xv.c">
+    <ClCompile Include="..\src\IMG_xv.c">
       <Filter>Sources</Filter>
     </ClCompile>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/VisualC/SDL_image.vcxproj b/VisualC/SDL_image.vcxproj
index 9c9537e5..2ad24356 100644
--- a/VisualC/SDL_image.vcxproj
+++ b/VisualC/SDL_image.vcxproj
@@ -80,19 +80,19 @@
     <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <IncludePath>$(SolutionDir)..\include;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)..\include;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
     <LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <IncludePath>$(SolutionDir)..\include;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)..\include;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
     <LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <IncludePath>$(SolutionDir)..\include;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)..\include;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
     <LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <IncludePath>$(SolutionDir)..\include;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
+    <IncludePath>$(ProjectDir)..\include;$(SolutionDir)..\..\SDL\include;$(IncludePath)</IncludePath>
     <LibraryPath>$(SolutionDir)..\..\SDL\VisualC\$(PlatformName)\$(Configuration);$(LibraryPath)</LibraryPath>
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -107,7 +107,7 @@
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>external\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>src;external\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>DLL_EXPORT;_DEBUG;WIN32;_WINDOWS;USE_STBIMAGE;LOAD_BMP;LOAD_GIF;LOAD_JPG;LOAD_LBM;LOAD_PCX;LOAD_PNG;LOAD_PNM;LOAD_QOI;LOAD_SVG;LOAD_TGA;LOAD_TIF;LOAD_TIF_DYNAMIC="libtiff-5.dll";LOAD_WEBP;LOAD_WEBP_DYNAMIC="libwebp-7.dll";LOAD_XCF;LOAD_XPM;LOAD_XV;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
@@ -206,32 +206,32 @@
     <Bscmake />
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="..\IMG.c" />
-    <ClCompile Include="..\IMG_avif.c" />
-    <ClCompile Include="..\IMG_bmp.c" />
-    <ClCompile Include="..\IMG_gif.c" />
-    <ClCompile Include="..\IMG_jpg.c" />
-    <ClCompile Include="..\IMG_jxl.c" />
-    <ClCompile Include="..\IMG_lbm.c" />
-    <ClCompile Include="..\IMG_pcx.c" />
-    <ClCompile Include="..\IMG_png.c" />
-    <ClCompile Include="..\IMG_pnm.c" />
-    <ClCompile Include="..\IMG_qoi.c" />
-    <ClCompile Include="..\IMG_stb.c" />
-    <ClCompile Include="..\IMG_svg.c" />
-    <ClCompile Include="..\IMG_tga.c" />
-    <ClCompile Include="..\IMG_tif.c" />
-    <ClCompile Include="..\IMG_webp.c" />
-    <ClCompile Include="..\IMG_WIC.c" />
-    <ClCompile Include="..\IMG_xcf.c" />
-    <ClCompile Include="..\IMG_xpm.c" />
-    <ClCompile Include="..\IMG_xv.c" />
+    <ClCompile Include="..\src\IMG.c" />
+    <ClCompile Include="..\src\IMG_avif.c" />
+    <ClCompile Include="..\src\IMG_bmp.c" />
+    <ClCompile Include="..\src\IMG_gif.c" />
+    <ClCompile Include="..\src\IMG_jpg.c" />
+    <ClCompile Include="..\src\IMG_jxl.c" />
+    <ClCompile Include="..\src\IMG_lbm.c" />
+    <ClCompile Include="..\src\IMG_pcx.c" />
+    <ClCompile Include="..\src\IMG_png.c" />
+    <ClCompile Include="..\src\IMG_pnm.c" />
+    <ClCompile Include="..\src\IMG_qoi.c" />
+    <ClCompile Include="..\src\IMG_stb.c" />
+    <ClCompile Include="..\src\IMG_svg.c" />
+    <ClCompile Include="..\src\IMG_tga.c" />
+    <ClCompile Include="..\src\IMG_tif.c" />
+    <ClCompile Include="..\src\IMG_webp.c" />
+    <ClCompile Include="..\src\IMG_WIC.c" />
+    <ClCompile Include="..\src\IMG_xcf.c" />
+    <ClCompile Include="..\src\IMG_xpm.c" />
+    <ClCompile Include="..\src\IMG_xv.c" />
   </ItemGroup>
   <ItemGroup>
-    <ResourceCompile Include="Version.rc" />
+    <ResourceCompile Include="..\src\Version.rc" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\SDL_image.h" />
+    <ClInclude Include="..\include\SDL3\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 1bdf0661..1eff54bb 100644
--- a/VisualC/SDL_image.vcxproj.filters
+++ b/VisualC/SDL_image.vcxproj.filters
@@ -1,64 +1,64 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup>
-    <ClCompile Include="..\IMG.c">
+    <ClCompile Include="..\src\IMG.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_bmp.c">
+    <ClCompile Include="..\src\IMG_bmp.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_gif.c">
+    <ClCompile Include="..\src\IMG_gif.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_jpg.c">
+    <ClCompile Include="..\src\IMG_jpg.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_lbm.c">
+    <ClCompile Include="..\src\IMG_lbm.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_pcx.c">
+    <ClCompile Include="..\src\IMG_pcx.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_png.c">
+    <ClCompile Include="..\src\IMG_png.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_pnm.c">
+    <ClCompile Include="..\src\IMG_pnm.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_tga.c">
+    <ClCompile Include="..\src\IMG_tga.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_tif.c">
+    <ClCompile Include="..\src\IMG_tif.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_webp.c">
+    <ClCompile Include="..\src\IMG_webp.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_xcf.c">
+    <ClCompile Include="..\src\IMG_xcf.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_xpm.c">
+    <ClCompile Include="..\src\IMG_xpm.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_xv.c">
+    <ClCompile Include="..\src\IMG_xv.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_svg.c">
+    <ClCompile Include="..\src\IMG_svg.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_qoi.c">
+    <ClCompile Include="..\src\IMG_qoi.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_WIC.c">
+    <ClCompile Include="..\src\IMG_WIC.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_avif.c">
+    <ClCompile Include="..\src\IMG_avif.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_jxl.c">
+    <ClCompile Include="..\src\IMG_jxl.c">
       <Filter>Sources</Filter>
     </ClCompile>
-    <ClCompile Include="..\IMG_stb.c">
+    <ClCompile Include="..\src\IMG_stb.c">
       <Filter>Sources</Filter>
     </ClCompile>
   </ItemGroup>
@@ -77,13 +77,13 @@
     </Filter>
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="..\SDL_image.h">
+    <ClInclude Include="..\include\SDL3\SDL_image.h">
       <Filter>Public Headers</Filter>
     </ClInclude>
   </ItemGroup>
   <ItemGroup>
-    <ResourceCompile Include="Version.rc">
+    <ResourceCompile Include="..\src\version.rc">
       <Filter>Sources</Filter>
     </ResourceCompile>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/Xcode/SDL_image.xcodeproj/project.pbxproj b/Xcode/SDL_image.xcodeproj/project.pbxproj
index fddd23c1..f84545bb 100644
--- a/Xcode/SDL_image.xcodeproj/project.pbxproj
+++ b/Xcode/SDL_image.xcodeproj/project.pbxproj
@@ -163,32 +163,32 @@
 		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; };
 		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 = ../IMG_qoi.c; sourceTree = "<group>"; };
-		AA50AA461F9C7C50003B9C0C /* IMG_svg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IMG_svg.c; path = ../IMG_svg.c; sourceTree = "<group>"; };
-		AA579DE2161C07E6005F809B /* IMG_bmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownF

(Patch may be truncated, please check the link at the top of this post.)