Xcode templates can be configured to use framework or dylibs
Xocde templates now disable objective-c garbage collector
This commit is contained in:
parent
71277f06e5
commit
0580cba0cd
15 changed files with 265 additions and 121 deletions
|
@ -1,43 +1,66 @@
|
|||
XCODE 4 TEMPLATES
|
||||
=================
|
||||
|
||||
These are templates to create easily a new project in Xcode 4.
|
||||
These are templates to create easily a new SFML project in Xcode 4.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
* You can choose between command line tool or bundle application.
|
||||
* You can select or not each module of SFML you'll use into your project.
|
||||
* A basic example is inserted automatically into your project's code.
|
||||
* You can choose between using SFML libraries as dylibs or frameworks.
|
||||
* You can add independently each SFML module you'll use into your project.
|
||||
* A basic example is included automatically into your project's code.
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
Copy the four folders into ~/Library/Developer/Xcode/Templates folder (you might need to create it first).
|
||||
If you are building SFML from sources you can set CMake's INSTALL_XCODE4_TEMPLATES variable to TRUE to install the templates automatically. Otherwise proceed as follow :
|
||||
1. Make sure "~/Library/Developer/Xcode/Templates/" folder exists;
|
||||
2. Copy "SFML" folder into the above folder.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
To use these templates follow these steps :
|
||||
|
||||
* open Xcode 4,
|
||||
* select «create a new Xcode project» from the «Welcome to Xcode» window or select menu File > New > New Project,
|
||||
* select «Templates» under «Mac OS X»,
|
||||
* then select either «SFML Application» or «SFML Command Line Tool»,
|
||||
* fill in the requested information and you're done.
|
||||
1. open Xcode 4,
|
||||
2. select "create a new Xcode project" from the "Welcome to Xcode" window or select menus File > New > New Project,
|
||||
3. select "SFML" subsection under "Mac OS X",
|
||||
4. then select either "SFML Application" or "SFML Command Line Tool",
|
||||
5. fill in the requested information and you're done.
|
||||
|
||||
Note
|
||||
----
|
||||
Question & Answer
|
||||
-----------------
|
||||
|
||||
If you wish to add/remove any module of SFML from your project without rebuilding a new one follow these steps :
|
||||
* I would like to add/remove a module of SFML from my current project without creating a new one. How can I do that ?
|
||||
|
||||
* select your project from the project navigator panel (cmd+1),
|
||||
* select your project's target on the main area,
|
||||
* go to the «Build Settings» tab,
|
||||
* go down to the bottom,
|
||||
* edit any MODULEX_CONFIG variable (e.g. AUDIO_DEBUG, NETWORK_RELEASE) you want to.
|
||||
1. select your project from the project navigator panel,
|
||||
2. select your project's target on the main area,
|
||||
3. go to the "Build Settings" tab,
|
||||
4. go down to the bottom,
|
||||
5. set SFML_XXX variable, where XXX is the name of the module to add/remove to "$(SFML_LINK_PREFIX)sfml-XXX$(SFML_LINK_SUFFIX)" to add it or to "" (nothing) to remove it.
|
||||
|
||||
Examples :
|
||||
|
||||
* to disable the audio module simply erase the content of AUDIO_DEBUG and AUDIO_RELEASE.
|
||||
* to add the network module set NETWORK_DEBUG to '-lsfml-network-d' and NETWORK_RELEASE to '-lsfml-network'.
|
||||
* I changed my mind and would like to switch from dylibs to frameworks or vice versa. How can I do that ?
|
||||
|
||||
1. select your project from the project navigator panel,
|
||||
2. select your project's target on the main area,
|
||||
3. go to the "Build Settings" tab,
|
||||
4. go down to the bottom,
|
||||
5. update SFML_LINK_PREFIX and SFML_LINK_SUFFIX as follow :
|
||||
* if you want to use frameworks, then
|
||||
1. set SFML_LINK_PREFIX to "$(SFML_LINK_FRAMEWORKS_PREFIX)",
|
||||
2. set SFML_LINK_SUFFIX to "$(SFML_LINK_FRAMEWORKS_SUFFIX)"
|
||||
* if you want to use dylibs, then
|
||||
1. set SFML_LINK_PREFIX to "$(SFML_LINK_DYLIBS_PREFIX)",
|
||||
2. set SFML_LINK_SUFFIX to "$(SFML_LINK_DYLIBS_SUFFIX)"
|
||||
|
||||
|
||||
* I want to use the static version of SFML. Is it possible ?
|
||||
|
||||
Short answer : Don't do that!
|
||||
|
||||
We strongly recommend you to use either dylibs or frameworks on Mac OS X. Please refer to Apple documentation for information about static vs shared libraries debate.
|
||||
|
||||
If you really need/want to use static libraries proceed as follow. First, set your project to use dylibs (see above Q & A). Then set SFML_LINK_DYLIBS_SUFFIX to "-s-d" in debug mode and to "-s" in release mode. Finally, remove the script automatically generated by the application template (see Build Phases tab).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue