Updated Xcode templates and cmake script

What's new in the templates:
 - Removed support for 32 bits and gcc
 - Removed useless code
 - Removed custom warnings settings – let Xcode decide with its default values
 - Set default target version to CMAKE_OSX_DEPLOYMENT_TARGET

What's new in cmake script:
 - Added cmake options for archs and deployment target
 - Added minimum requirements checking
This commit is contained in:
Marco Antognini 2014-04-15 18:44:55 +02:00
parent 0a5f38157f
commit 19012c66ea
4 changed files with 37 additions and 125 deletions

View file

@ -27,9 +27,10 @@ subject to the following restrictions:
<!--
This template defines :
- the compiler & std lib
- the supported arch
- the supported arch (only 64 bit)
- some other target's settings (e.g. warnings flags)
- the search paths
- deployment target (according to CMake build settings)
-->
<plist version="1.0">
@ -69,32 +70,6 @@ subject to the following restrictions:
<key>Units</key>
<dict>
<!-- Use GCC and libstdc++ -->
<key>C++98 with GCC and libstdc++ and target 10.5</key>
<dict>
<key>Project</key>
<dict>
<key>SharedSettings</key>
<dict>
<key>GCC_VERSION</key>
<string>com.apple.compilers.llvmgcc42</string>
<key>MACOSX_DEPLOYMENT_TARGET</key>
<string>10.5</string>
</dict>
</dict>
<key>Targets</key>
<array>
<dict>
<key>Frameworks</key>
<array>
<string>Foundation</string>
</array>
</dict>
</array>
</dict>
<!-- Use Clang and libstdc++ -->
<key>C++98 with Clang and libstdc++</key>
<dict>
@ -135,67 +110,6 @@ subject to the following restrictions:
</dict>
</dict>
<dict>
<key>Identifier</key>
<string>archType</string>
<key>Name</key>
<string>[ADVANCED] Architectures</string>
<key>Description</key>
<string>Choose which architecture(s) you want to support</string>
<key>Default</key>
<string>Universal</string>
<key>NotPersisted</key>
<true />
<key>Type</key>
<string>popup</string>
<key>Units</key>
<dict>
<!-- Support 32 + 64 bits -->
<key>Universal</key>
<dict>
<key>Project</key>
<dict>
<key>SharedSettings</key>
<dict>
<key>ARCHS</key>
<string>$(ARCHS_STANDARD_32_64_BIT)</string>
</dict>
</dict>
</dict>
<!-- Support 64 bits -->
<key>64 bits</key>
<dict>
<key>Project</key>
<dict>
<key>SharedSettings</key>
<dict>
<key>ARCHS</key>
<string>$(ARCHS_STANDARD_64_BIT)</string>
</dict>
</dict>
</dict>
<!-- Support 32 bits -->
<key>32 bits</key>
<dict>
<key>Project</key>
<dict>
<key>SharedSettings</key>
<dict>
<key>ARCHS</key>
<string>$(ARCHS_STANDARD_32_BIT)</string>
</dict>
</dict>
</dict>
</dict>
</dict>
</array>
<!--
@ -204,23 +118,18 @@ subject to the following restrictions:
<key>Project</key>
<dict>
<key>SharedSettings</key>
<dict
<dict>
<!-- PLATFORM -->
<key>SUPPORTED_PLATFORMS</key>
<string>macosx</string>
<!-- WARNINGS -->
<!-- TODO add more warnings -->
<key>GCC_WARN_ABOUT_RETURN_TYPE</key>
<string>YES</string>
<key>GCC_WARN_UNINITIALIZED_AUTOS</key>
<string>YES</string>
<key>GCC_WARN_UNUSED_VARIABLE</key>
<string>YES</string>
<key>CLANG_WARN__DUPLICATE_METHOD_MATCH</key>
<string>YES</string>
<key>CLANG_WARN_EMPTY_BODY</key>
<string>YES</string>
<!-- ARCHITECTURES: only 64 bit -->
<key>ARCHS</key>
<string>$(ARCHS_STANDARD_64_BIT)</string>
<!-- DEPLOYMENT -->
<key>MACOSX_DEPLOYMENT_TARGET</key>
<string>@CMAKE_OSX_DEPLOYMENT_TARGET@</string>
<!-- SERACH PATHS -->
<key>FRAMEWORK_SEARCH_PATHS</key>
@ -237,25 +146,10 @@ subject to the following restrictions:
<dict>
<key>Debug</key>
<dict>
<key>GCC_OPTIMIZATION_LEVEL</key>
<string>0</string>
<key>GCC_PREPROCESSOR_DEFINITIONS</key>
<string>DEBUG=1 $(inherited)</string>
<!-- ALWAYS compile for all arch. -->
<key>ONLY_ACTIVE_ARCH</key>
<string>NO</string>
</dict>
<key>Release</key>
<dict>
<key>COPY_PHASE_STRIP</key>
<string>YES</string>
<!-- ALWAYS compile for all arch. -->
<key>ONLY_ACTIVE_ARCH</key>
<string>NO</string>
</dict>
</dict>
</dict>

View file

@ -38,7 +38,7 @@ Before installing the template, make sure you have installed:
- Xcode 4 or Xcode 5, up to date
- Installed Xcode's Command Line Tools
- SFML 2, either as framework or dylibs binaries
- SFML 2, either framework or dylib binaries
There is one constraint on the installation of SFML: the frameworks needs to be installed in /Library/Frameworks and the dylibs into /usr/local/lib. You don't need both but make sure they are in the correct folder.
@ -71,8 +71,8 @@ Note : some settings are marked as "[ADVANCED]" in the wizard. If you're not sur
Question & Answer
-----------------
FAQ
---
* I want to use Xcode 3. Can I use these templates anyway?