Generate Xcode project which can support both iOS and iOS Simulator
This commit is contained in:
parent
c94deaee9d
commit
8dc55721d0
|
@ -21,6 +21,7 @@ if(APPLE)
|
|||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum macOS deployment version")
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "")
|
||||
endif()
|
||||
set(ZLIB_LIBRARY "-lz" CACHE STRING "Use generic linker flag for Xcode to support multiple SDKs")
|
||||
endif()
|
||||
|
||||
if(LIBRETRO)
|
||||
|
|
|
@ -36,10 +36,16 @@
|
|||
#error Unsupported architecture
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_IPHONE) && !defined(__aarch64__)
|
||||
#if defined(__APPLE__)
|
||||
#include "TargetConditionals.h"
|
||||
#if defined(TARGET_OS_SIMULATOR)
|
||||
// iOS simulator
|
||||
#define TARGET_NO_REC
|
||||
#endif
|
||||
#if defined(TARGET_MAC) && HOST_CPU == CPU_ARM64
|
||||
#define TARGET_ARM_MAC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_NO_REC)
|
||||
#define FEAT_SHREC DYNAREC_NONE
|
||||
|
|
|
@ -56,8 +56,7 @@ int darw_printf(const char* Text,...);
|
|||
#endif
|
||||
|
||||
#ifndef TARGET_IPHONE
|
||||
#if defined(__APPLE__) && defined(__MACH__) && HOST_CPU == CPU_ARM64
|
||||
#define TARGET_ARM_MAC
|
||||
#if defined(TARGET_ARM_MAC)
|
||||
#include <pthread.h>
|
||||
inline static void JITWriteProtect(bool enabled) {
|
||||
if (__builtin_available(macOS 11.0, *))
|
||||
|
|
|
@ -323,6 +323,13 @@ static void updateAudioSession(Event event, void *)
|
|||
}
|
||||
settings.display.dpi = 160.f * scale;
|
||||
initRenderApi();
|
||||
#if defined(TARGET_OS_SIMULATOR) && HOST_CPU == CPU_ARM64
|
||||
if (config::RendererType.get() == RenderType::OpenGL)
|
||||
{
|
||||
NSLog(@"🚨🚨🚨 OpenGL renderer is not supported in Apple Silicon Mac 🚨🚨🚨\n");
|
||||
raise(SIGTRAP);
|
||||
}
|
||||
#endif
|
||||
mainui_init();
|
||||
|
||||
[self altKitStart];
|
||||
|
|
|
@ -6,7 +6,11 @@ echo "2) iOS"
|
|||
read -p "Choose your target platform: " x
|
||||
|
||||
if [ $x -eq 2 ]; then
|
||||
option="-DCMAKE_SYSTEM_NAME=iOS"
|
||||
if [ "$(uname -m)" = "arm64" ]; then
|
||||
option="-DCMAKE_SYSTEM_NAME=iOS"
|
||||
else
|
||||
option="-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"
|
||||
fi
|
||||
lldbinitfolder="emulator-ios"
|
||||
echo 'Building iOS xcodeproj for debugging'
|
||||
echo 'Remove CODE_SIGNING_ALLOWED=NO in Build Settings if you are using your Apple Developer Certificate for signing'
|
||||
|
|
Loading…
Reference in New Issue