diff --git a/CMakeLists.txt b/CMakeLists.txt index 286745f2..e63611e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,6 +144,16 @@ if(SFML_OS_MACOSX) return() endif() endif() + + # configure Xcode templates + if(CMAKE_OSX_ARCHITECTURES) + # maybe multiple arches are present in CMAKE_OSX_ARCHITECTURES + # we simply need to replace ';' by ' ' (space) and store the result in XCODE_TEMPLATES_ARCH + string(REPLACE ";" " " XCODE_TEMPLATES_ARCH "${CMAKE_OSX_ARCHITECTURES}") + else() + # no arch was provided to cmake, so we use the default one + set(XCODE_TEMPLATES_ARCH "\$(NATIVE_ARCH_ACTUAL)") + endif() endif() if(SFML_OS_LINUX OR SFML_OS_FREEBSD) diff --git a/tools/xcode/templates/SFML/SFML Compiler.xctemplate/TemplateInfo.plist.in b/tools/xcode/templates/SFML/SFML Compiler.xctemplate/TemplateInfo.plist.in index 30782842..83c20fbd 100644 --- a/tools/xcode/templates/SFML/SFML Compiler.xctemplate/TemplateInfo.plist.in +++ b/tools/xcode/templates/SFML/SFML Compiler.xctemplate/TemplateInfo.plist.in @@ -123,9 +123,9 @@ subject to the following restrictions: SUPPORTED_PLATFORMS macosx - + ARCHS - $(ARCHS_STANDARD_64_BIT) + @XCODE_TEMPLATES_ARCH@ MACOSX_DEPLOYMENT_TARGET