SDL_net: Updated the DMG build process

From b9f5213020ab95c5d4bad9dd921bb5da5f9bb097 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 17 Aug 2022 10:41:20 -0700
Subject: [PATCH] Updated the DMG build process

---
 Xcode/SDL_net.xcodeproj/project.pbxproj |  2 +-
 Xcode/pkg-support/resources/ReadMe.txt  | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/Xcode/SDL_net.xcodeproj/project.pbxproj b/Xcode/SDL_net.xcodeproj/project.pbxproj
index 154768c..8983f2e 100644
--- a/Xcode/SDL_net.xcodeproj/project.pbxproj
+++ b/Xcode/SDL_net.xcodeproj/project.pbxproj
@@ -320,7 +320,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "PRODUCT_NAME=SDL2_net\n\n# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n    codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" $TARGET_BUILD_DIR/$PRODUCT_NAME.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/$PRODUCT_NAME.framework build/dmg-tmp/\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nrm -rf build/dmg-tmp/.DS_Store\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname $PRODUCT_NAME -srcfolder build/dmg-tmp build/$PRODUCT_NAME.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
+			shellScript = "PRODUCT_NAME=SDL2_net\n\n# Sign framework\nif [ \"$SDL_CODESIGN_IDENTITY\" != \"\" ]; then\n    codesign --force --deep --sign \"$SDL_CODESIGN_IDENTITY\" --preserve-metadata\\=identifier,entitlements,flags --generate-entitlement-der $TARGET_BUILD_DIR/$PRODUCT_NAME.framework/Versions/A || exit $?\nfi\n\n# clean up the framework, remove headers, extra files\nmkdir -p build/dmg-tmp\ncp -a $TARGET_BUILD_DIR/$PRODUCT_NAME.framework build/dmg-tmp/\ncp pkg-support/resources/ReadMe.txt build/dmg-tmp\n\n# remove the .DS_Store files if any (we may want to provide one in the future for fancy .dmgs)\nrm -rf build/dmg-tmp/.DS_Store\n\n# create the dmg\nhdiutil create -ov -fs HFS+ -volname $PRODUCT_NAME -srcfolder build/dmg-tmp build/$PRODUCT_NAME.dmg\n\n# clean up\nrm -rf build/dmg-tmp\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 
diff --git a/Xcode/pkg-support/resources/ReadMe.txt b/Xcode/pkg-support/resources/ReadMe.txt
index 873d667..938df9e 100644
--- a/Xcode/pkg-support/resources/ReadMe.txt
+++ b/Xcode/pkg-support/resources/ReadMe.txt
@@ -14,10 +14,13 @@ Copy the SDL2_net.framework to /Library/Frameworks
 
 You may alternatively install it in <your home directory>/Library/Frameworks if your access privileges are not high enough. (Be aware that the Xcode templates we provide in the SDL Developer Extras package may require some adjustment for your system if you do this.)
 
-
-(Partial) History of PB/Xcode projects:
-2009-09-21 - Updated for 64-bit (Snow Leopard) Universal Binaries.
-	Switched to 10.4 minimum requirement.
-
-2006-01-31 - First entry in history. Updated for Universal Binaries.
-
+Use in CMake projects:
+SDL2_net.framework can be used in CMake projects using the following pattern:
+```
+find_package(SDL2_net REQUIRED)
+add_executable(my_game ${MY_SOURCES})
+target_link_libraries(my_game PRIVATE SDL2_net::SDL2_net)
+```
+If SDL2_net.framework is installed in a non-standard location,
+please refer to the following link for ways to configure CMake:
+https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure