From bfda3b8c344461f23c6793370dc4c8a725ea1feb Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Sun, 8 Jul 2012 19:21:15 +0200 Subject: [PATCH] Improved Xcode templates and the readme (Close #224) --- .../TemplateInfo.plist | 30 ++++++++----------- .../TemplateInfo.plist | 26 +++++++--------- tools/xcode/templates/readme.txt | 19 +++++++----- 3 files changed, 34 insertions(+), 41 deletions(-) diff --git a/tools/xcode/templates/SFML/SFML Application Base.xctemplate/TemplateInfo.plist b/tools/xcode/templates/SFML/SFML Application Base.xctemplate/TemplateInfo.plist index 79406963c..1314e5ebc 100644 --- a/tools/xcode/templates/SFML/SFML Application Base.xctemplate/TemplateInfo.plist +++ b/tools/xcode/templates/SFML/SFML Application Base.xctemplate/TemplateInfo.plist @@ -66,14 +66,8 @@ subject to the following restrictions: SharedSettings - SFML_LINK_PREFIX - $(SFML_LINK_FRAMEWORKS_PREFIX) - - SFML_LINK_SUFFIX - $(SFML_LINK_FRAMEWORKS_SUFFIX) - - HEADER_SEARCH_PATHS - $(HEADER_SEARCH_PATHS) + SFML_BINARY_TYPE + FRAMEWORKS @@ -85,14 +79,8 @@ subject to the following restrictions: SharedSettings - SFML_LINK_PREFIX - $(SFML_LINK_DYLIBS_PREFIX) - - SFML_LINK_SUFFIX - $(SFML_LINK_DYLIBS_SUFFIX) - - HEADER_SEARCH_PATHS - $(HEADER_SEARCH_PATHS) /usr/local/include/ + SFML_BINARY_TYPE + DYLIBS @@ -558,7 +546,7 @@ music.play(); main.cpp:main:graphics_display main.cpp:main:display ResourcePath.mm - ResourcePath.hpp + ResourcePath.hpp @@ -652,11 +640,17 @@ while (window.isOpen()) SFML_LINK_FRAMEWORKS_PREFIX -framework - SFML_SYSTEM + SFML_SYSTEM $(SFML_LINK_PREFIX)sfml-system$(SFML_LINK_SUFFIX) SFML_LINK_FRAMEWORKS_SUFFIX + + SFML_LINK_PREFIX + $(SFML_LINK_$(SFML_BINARY_TYPE)_PREFIX) + + SFML_LINK_SUFFIX + $(SFML_LINK_$(SFML_BINARY_TYPE)_SUFFIX) CLANG_ENABLE_OBJC_ARC diff --git a/tools/xcode/templates/SFML/SFML Command Line Tool Base.xctemplate/TemplateInfo.plist b/tools/xcode/templates/SFML/SFML Command Line Tool Base.xctemplate/TemplateInfo.plist index 0e0a402de..bd475d26c 100644 --- a/tools/xcode/templates/SFML/SFML Command Line Tool Base.xctemplate/TemplateInfo.plist +++ b/tools/xcode/templates/SFML/SFML Command Line Tool Base.xctemplate/TemplateInfo.plist @@ -66,14 +66,8 @@ subject to the following restrictions: SharedSettings - SFML_LINK_PREFIX - $(SFML_LINK_FRAMEWORKS_PREFIX) - - SFML_LINK_SUFFIX - $(SFML_LINK_FRAMEWORKS_SUFFIX) - - HEADER_SEARCH_PATHS - $(HEADER_SEARCH_PATHS) + SFML_BINARY_TYPE + FRAMEWORKS @@ -85,14 +79,8 @@ subject to the following restrictions: SharedSettings - SFML_LINK_PREFIX - $(SFML_LINK_DYLIBS_PREFIX) - - SFML_LINK_SUFFIX - $(SFML_LINK_DYLIBS_SUFFIX) - - HEADER_SEARCH_PATHS - $(HEADER_SEARCH_PATHS) /usr/local/include/ + SFML_BINARY_TYPE + DYLIBS @@ -654,6 +642,12 @@ while (window.isOpen()) SFML_LINK_FRAMEWORKS_SUFFIX + + SFML_LINK_PREFIX + $(SFML_LINK_$(SFML_BINARY_TYPE)_PREFIX) + + SFML_LINK_SUFFIX + $(SFML_LINK_$(SFML_BINARY_TYPE)_SUFFIX) CLANG_ENABLE_OBJC_ARC diff --git a/tools/xcode/templates/readme.txt b/tools/xcode/templates/readme.txt index ee41b9d68..6270e8aff 100644 --- a/tools/xcode/templates/readme.txt +++ b/tools/xcode/templates/readme.txt @@ -47,13 +47,18 @@ Question & Answer 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)" + 5. set SFML_BINARY_TYPE either to "DYLIBS" or "FRAMEWORKS". + + + * How to use/don't use debug dylibs ? + + You can choose to use or not SFML debug binaries when creating a new project. However, if you have already created your project you can do the following : + + 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_LINK_DYLIBS_SUFFIX_DEBUG to "-d" to use them or to "" (empty string) to use only release binary. * I want to use the static version of SFML. Is it possible ?