From 0d036556052cda92f04f8c0688e48d18cd3f080c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Sundstr=C3=B6m?= Date: Tue, 7 Feb 2023 12:59:46 +0100 Subject: [PATCH] CREATE_PROJECT: Add Accelerate framework to iOS and tvOS Add Apple Accelerate framework to iOS and tvOS targets. The framework utilizes NEON extensions on the ARM chip to accelerate calculations. This will come to use when processing texture data. --- configure | 2 +- devtools/create_project/xcode.cpp | 3 +++ ports.mk | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 6e469b338b3..ae00b289514 100755 --- a/configure +++ b/configure @@ -3886,7 +3886,7 @@ case $_backend in append_var LIBS "-lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES" append_var LIBS "-framework QuartzCore -framework CoreFoundation -framework Foundation" append_var LIBS "-framework AudioToolbox -framework CoreAudio -framework SystemConfiguration " - append_var LIBS "-framework GameController" + append_var LIBS "-framework GameController -framework Accelerate" if test "$_host" = 'tvos'; then append_var LDFLAGS "-mtvos-version-min=9 -arch arm64" append_var CFLAGS "-mtvos-version-min=9 -arch arm64" diff --git a/devtools/create_project/xcode.cpp b/devtools/create_project/xcode.cpp index be06f56eeec..a913d10bf4b 100644 --- a/devtools/create_project/xcode.cpp +++ b/devtools/create_project/xcode.cpp @@ -454,6 +454,7 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { std::map properties; int fwOrder = 0; // Frameworks + DEF_SYSFRAMEWORK("Accelerate"); DEF_SYSFRAMEWORK("ApplicationServices"); DEF_SYSFRAMEWORK("AudioToolbox"); DEF_SYSFRAMEWORK("AudioUnit"); @@ -582,6 +583,7 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { frameworks_iOS.push_back("AudioToolbox.framework"); frameworks_iOS.push_back("QuartzCore.framework"); frameworks_iOS.push_back("OpenGLES.framework"); + frameworks_iOS.push_back("Accelerate.framework"); if (CONTAINS_DEFINE(setup.defines, "USE_FAAD")) { frameworks_iOS.push_back("libfaad.a"); @@ -792,6 +794,7 @@ void XcodeProvider::setupFrameworksBuildPhase(const BuildSetup &setup) { frameworks_tvOS.push_back("AudioToolbox.framework"); frameworks_tvOS.push_back("QuartzCore.framework"); frameworks_tvOS.push_back("OpenGLES.framework"); + frameworks_tvOS.push_back("Accelerate.framework"); if (CONTAINS_DEFINE(setup.defines, "USE_FAAD")) { frameworks_tvOS.push_back("libfaad.a"); diff --git a/ports.mk b/ports.mk index 5b7d78a4a8b..b6506bddcfd 100644 --- a/ports.mk +++ b/ports.mk @@ -556,7 +556,7 @@ iphone: $(DETECT_OBJS) $(OBJS) +$(LD) $(LDFLAGS) -o scummvm $(DETECT_OBJS) $(OBJS) \ $(OSX_STATIC_LIBS) \ -framework UIKit -framework CoreGraphics -framework OpenGLES -framework GameController \ - -framework CoreFoundation -framework QuartzCore -framework Foundation \ + -framework CoreFoundation -framework QuartzCore -framework Foundation -framework Accelerate \ -framework AudioToolbox -framework CoreAudio -framework SystemConfiguration -lobjc -lz # Special target to create a snapshot disk image for macOS