From 6c802952fb5e8eedb4909f61c6e8857f45d57f8d Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Wed, 21 May 2014 11:02:43 +0200 Subject: [PATCH] Added config of Xcode templates according to CMAKE_OSX_ARCHITECTURES --- CMakeLists.txt | 10 ++++++++++ .../SFML Compiler.xctemplate/TemplateInfo.plist.in | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) 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