Added config of Xcode templates according to CMAKE_OSX_ARCHITECTURES

This commit is contained in:
Marco Antognini 2014-05-21 11:02:43 +02:00
parent ea0364d568
commit 6c802952fb
2 changed files with 12 additions and 2 deletions

View File

@ -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)

View File

@ -123,9 +123,9 @@ subject to the following restrictions:
<key>SUPPORTED_PLATFORMS</key>
<string>macosx</string>
<!-- ARCHITECTURES: only 64 bit -->
<!-- ARCHITECTURES -->
<key>ARCHS</key>
<string>$(ARCHS_STANDARD_64_BIT)</string>
<string>@XCODE_TEMPLATES_ARCH@</string>
<!-- DEPLOYMENT -->
<key>MACOSX_DEPLOYMENT_TARGET</key>