SDL_image: Fixed building with third party library dependencies

From 20f11e5cc91e98e2c7a5f1606866d6320a529043 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 20 May 2022 10:13:12 -0700
Subject: [PATCH] Fixed building with third party library dependencies

Overriding GCC_PREPROCESSOR_DEFINITIONS in xcconfig file wasn't working in Xcode 13.4
---
 Xcode/SDL_image.xcodeproj/project.pbxproj |  4 ++++
 Xcode/config.xcconfig                     | 12 ++++++------
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/Xcode/SDL_image.xcodeproj/project.pbxproj b/Xcode/SDL_image.xcodeproj/project.pbxproj
index 5663d3b..1636542 100644
--- a/Xcode/SDL_image.xcodeproj/project.pbxproj
+++ b/Xcode/SDL_image.xcodeproj/project.pbxproj
@@ -649,6 +649,7 @@
 					LOAD_TIF,
 					LOAD_XPM,
 					LOAD_XV,
+					"$(CONFIG_PREPROCESSOR_DEFINITIONS)",
 				);
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				HEADER_SEARCH_PATHS = (
@@ -679,6 +680,7 @@
 		007288120F0DA5BA00C302A9 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
 			};
 			name = Debug;
 		};
@@ -735,6 +737,7 @@
 					LOAD_TIF,
 					LOAD_XPM,
 					LOAD_XV,
+					"$(CONFIG_PREPROCESSOR_DEFINITIONS)",
 				);
 				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
 				HEADER_SEARCH_PATHS = (
@@ -764,6 +767,7 @@
 		007288160F0DA5C400C302A9 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
 			};
 			name = Release;
 		};
diff --git a/Xcode/config.xcconfig b/Xcode/config.xcconfig
index 98ac178..0ead90e 100644
--- a/Xcode/config.xcconfig
+++ b/Xcode/config.xcconfig
@@ -8,15 +8,15 @@
 
 // Uncomment these lines to enable AVIF support
 // If you do this, you should run external/download.sh to download the decode libraries and add avif.framework to your application bundle.
-//GCC_PREPROCESSOR_DEFINITIONS = $(inherited) -DLOAD_AVIF
-//OTHER_LDFLAGS = $(inherited) -weak_framework avif
+//CONFIG_PREPROCESSOR_DEFINITIONS = $(inherited) LOAD_AVIF
+//CONFIG_FRAMEWORK_LDFLAGS = $(inherited) -weak_framework avif
 
 // Uncomment these lines to enable JPEG-XL support
 // If you do this, you should run external/download.sh to download the decode libraries and add jxl.framework to your application bundle.
-//GCC_PREPROCESSOR_DEFINITIONS = $(inherited) -DLOAD_JXL
-//OTHER_LDFLAGS = $(inherited) -weak_framework jxl
+//CONFIG_PREPROCESSOR_DEFINITIONS = $(inherited) LOAD_JXL
+//CONFIG_FRAMEWORK_LDFLAGS = $(inherited) -weak_framework jxl
 
 // Uncomment these lines to enable WebP support
 // If you do this, you should run external/download.sh to download the decode libraries and add webp.framework to your application bundle.
-//GCC_PREPROCESSOR_DEFINITIONS = $(inherited) -DLOAD_WEBP
-//OTHER_LDFLAGS = $(inherited) -weak_framework webp
+//CONFIG_PREPROCESSOR_DEFINITIONS = $(inherited) LOAD_WEBP
+//CONFIG_FRAMEWORK_LDFLAGS = $(inherited) -weak_framework webp