mirror of
https://github.com/SFML/SFML.git
synced 2025-01-19 15:55:13 +08:00
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
@ -42,6 +42,64 @@ subject to the following restrictions:
|
|||||||
<!-- ############################################################### Options -->
|
<!-- ############################################################### Options -->
|
||||||
<key>Options</key>
|
<key>Options</key>
|
||||||
<array>
|
<array>
|
||||||
|
<!-- ****************************************** Framework option -->
|
||||||
|
<dict>
|
||||||
|
<key>Identifier</key>
|
||||||
|
<string>libraryType</string>
|
||||||
|
<key>Name</key>
|
||||||
|
<string>Use frameworks</string>
|
||||||
|
<key>Description</key>
|
||||||
|
<string>Indicates whether frameworks should be used instead of dylibs or not.</string>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>checkbox</string>
|
||||||
|
<key>SortOrder</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Default</key>
|
||||||
|
<string>false</string>
|
||||||
|
<key>Units</key>
|
||||||
|
<dict>
|
||||||
|
<!-- ON -->
|
||||||
|
<key>true</key>
|
||||||
|
<dict>
|
||||||
|
<!-- compilation options -->
|
||||||
|
<key>Project</key>
|
||||||
|
<dict>
|
||||||
|
<key>SharedSettings</key>
|
||||||
|
<dict>
|
||||||
|
<key>SFML_LINK_PREFIX</key>
|
||||||
|
<string>$(SFML_LINK_FRAMEWORKS_PREFIX)</string>
|
||||||
|
|
||||||
|
<key>SFML_LINK_SUFFIX</key>
|
||||||
|
<string>$(SFML_LINK_FRAMEWORKS_SUFFIX)</string>
|
||||||
|
|
||||||
|
<key>HEADER_SEARCH_PATHS</key>
|
||||||
|
<string>$(HEADER_SEARCH_PATHS)</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<!-- OFF -->
|
||||||
|
<key>false</key>
|
||||||
|
<dict>
|
||||||
|
<!-- compilation options -->
|
||||||
|
<key>Project</key>
|
||||||
|
<dict>
|
||||||
|
<key>SharedSettings</key>
|
||||||
|
<dict>
|
||||||
|
<key>SFML_LINK_PREFIX</key>
|
||||||
|
<string>$(SFML_LINK_DYLIBS_PREFIX)</string>
|
||||||
|
|
||||||
|
<key>SFML_LINK_SUFFIX</key>
|
||||||
|
<string>$(SFML_LINK_DYLIBS_SUFFIX)</string>
|
||||||
|
|
||||||
|
<key>HEADER_SEARCH_PATHS</key>
|
||||||
|
<string>$(HEADER_SEARCH_PATHS) /usr/local/include/</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
|
||||||
<!-- ********************************************* Window Module -->
|
<!-- ********************************************* Window Module -->
|
||||||
<dict>
|
<dict>
|
||||||
<key>Identifier</key>
|
<key>Identifier</key>
|
||||||
@ -66,11 +124,8 @@ subject to the following restrictions:
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>WINDOW_RELEASE</key>
|
<key>SFML_WINDOW</key>
|
||||||
<string>-lsfml-window</string>
|
<string>$(SFML_LINK_PREFIX)sfml-window$(SFML_LINK_SUFFIX)</string>
|
||||||
|
|
||||||
<key>WINDOW_DEBUG</key>
|
|
||||||
<string>-lsfml-window-d</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
@ -99,10 +154,7 @@ subject to the following restrictions:
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>WINDOW_RELEASE</key>
|
<key>SFML_WINDOW</key>
|
||||||
<string></string>
|
|
||||||
|
|
||||||
<key>WINDOW_DEBUG</key>
|
|
||||||
<string></string>
|
<string></string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@ -157,11 +209,8 @@ subject to the following restrictions:
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>GRAPHICS_RELEASE</key>
|
<key>SFML_GRAPHICS</key>
|
||||||
<string>-lsfml-graphics</string>
|
<string>$(SFML_LINK_PREFIX)sfml-graphics$(SFML_LINK_SUFFIX)</string>
|
||||||
|
|
||||||
<key>GRAPHICS_DEBUG</key>
|
|
||||||
<string>-lsfml-graphics-d</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
@ -256,10 +305,7 @@ text.SetColor(sf::Color::Black);
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>GRAPHICS_RELEASE</key>
|
<key>SFML_GRAPHICS</key>
|
||||||
<string></string>
|
|
||||||
|
|
||||||
<key>GRAPHICS_DEBUG</key>
|
|
||||||
<string></string>
|
<string></string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@ -307,11 +353,8 @@ text.SetColor(sf::Color::Black);
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>AUDIO_RELEASE</key>
|
<key>SFML_AUDIO</key>
|
||||||
<string>-lsfml-audio</string>
|
<string>$(SFML_LINK_PREFIX)sfml-audio$(SFML_LINK_SUFFIX)</string>
|
||||||
|
|
||||||
<key>AUDIO_DEBUG</key>
|
|
||||||
<string>-lsfml-audio-d</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
@ -354,10 +397,7 @@ music.Play();
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>AUDIO_RELEASE</key>
|
<key>SFML_AUDIO</key>
|
||||||
<string></string>
|
|
||||||
|
|
||||||
<key>AUDIO_DEBUG</key>
|
|
||||||
<string></string>
|
<string></string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@ -402,11 +442,8 @@ music.Play();
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NETWORK_RELEASE</key>
|
<key>SFML_NETWORK</key>
|
||||||
<string>-lsfml-network</string>
|
<string>$(SFML_LINK_PREFIX)sfml-network$(SFML_LINK_SUFFIX)</string>
|
||||||
|
|
||||||
<key>NETWORK_DEBUG</key>
|
|
||||||
<string>-lsfml-network-d</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
@ -427,10 +464,7 @@ music.Play();
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NETWORK_RELEASE</key>
|
<key>SFML_NETWORK</key>
|
||||||
<string></string>
|
|
||||||
|
|
||||||
<key>NETWORK_DEBUG</key>
|
|
||||||
<string></string>
|
<string></string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@ -560,13 +594,23 @@ while (window.IsOpened())
|
|||||||
<key>PRODUCT_NAME</key>
|
<key>PRODUCT_NAME</key>
|
||||||
<string>$(TARGET_NAME)</string>
|
<string>$(TARGET_NAME)</string>
|
||||||
|
|
||||||
<key>SYSTEM_RELEASE</key>
|
<key>SFML_LINK_DYLIBS_PREFIX</key>
|
||||||
<string>-lsfml-system</string>
|
<string>-l</string>
|
||||||
<key>SYSTEM_DEBUG</key>
|
|
||||||
<string>-lsfml-system-d</string>
|
<key>SFML_LINK_FRAMEWORKS_PREFIX</key>
|
||||||
|
<string>-framework </string>
|
||||||
<key>HEADER_SEARCH_PATHS</key>
|
|
||||||
<string>$(HEADER_SEARCH_PATHS) /usr/local/include/</string>
|
<key>SFML_SYSTEM</key>
|
||||||
|
<string>$(SFML_LINK_PREFIX)sfml-system$(SFML_LINK_SUFFIX)</string>
|
||||||
|
|
||||||
|
<key>SFML_LINK_FRAMEWORKS_SUFFIX</key>
|
||||||
|
<string></string>
|
||||||
|
|
||||||
|
<key>CLANG_ENABLE_OBJC_ARC</key>
|
||||||
|
<string></string>
|
||||||
|
|
||||||
|
<key>GCC_ENABLE_OBJC_GC</key>
|
||||||
|
<string>unsupported</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
<key>Configurations</key>
|
<key>Configurations</key>
|
||||||
@ -574,16 +618,22 @@ while (window.IsOpened())
|
|||||||
<!-- ***************************************************** Debug -->
|
<!-- ***************************************************** Debug -->
|
||||||
<key>Debug</key>
|
<key>Debug</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>SFML_LINK_DYLIBS_SUFFIX</key>
|
||||||
|
<string>-d</string>
|
||||||
|
|
||||||
<key>OTHER_LDFLAGS</key>
|
<key>OTHER_LDFLAGS</key>
|
||||||
<string>$(OTHER_LDFLAGS) $(SYSTEM_DEBUG) $(WINDOW_DEBUG) $(GRAPHICS_DEBUG) $(AUDIO_DEBUG) $(NETWORK_DEBUG)</string>
|
<string>$(OTHER_LDFLAGS) $(SFML_SYSTEM) $(SFML_WINDOW) $(SFML_GRAPHICS) $(SFML_AUDIO) $(SFML_NETWORK)</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
|
|
||||||
<!-- *************************************************** Release -->
|
<!-- *************************************************** Release -->
|
||||||
<key>Release</key>
|
<key>Release</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>SFML_LINK_DYLIBS_SUFFIX</key>
|
||||||
|
<string></string>
|
||||||
|
|
||||||
<key>OTHER_LDFLAGS</key>
|
<key>OTHER_LDFLAGS</key>
|
||||||
<string>$(OTHER_LDFLAGS) $(SYSTEM_RELEASE) $(WINDOW_RELEASE) $(GRAPHICS_RELEASE) $(AUDIO_RELEASE) $(NETWORK_RELEASE)</string>
|
<string>$(OTHER_LDFLAGS) $(SFML_SYSTEM) $(SFML_WINDOW) $(SFML_GRAPHICS) $(SFML_AUDIO) $(SFML_NETWORK)</string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@ -606,8 +656,16 @@ while (window.IsOpened())
|
|||||||
<string>/bin/sh</string>
|
<string>/bin/sh</string>
|
||||||
|
|
||||||
<key>ShellScript</key>
|
<key>ShellScript</key>
|
||||||
<string># This shell script simply copies required sfml dylibs into the application bundle frameworks folder
|
<string># This shell script simply copies required sfml dylibs/frameworks into the application bundle frameworks folder.
|
||||||
# NB : this script assumes that if moduleX is required in release mode then it is also required in debug mode.
|
# If you're using static libraries (which is not recommended) you should remove this script from your project.
|
||||||
|
|
||||||
|
# Are we building a project that uses framework or dylibs ?
|
||||||
|
if [ $SFML_LINK_PREFIX = $SFML_LINK_FRAMEWORKS_PREFIX ]
|
||||||
|
then
|
||||||
|
frameworks=1
|
||||||
|
else
|
||||||
|
frameworks=0
|
||||||
|
fi
|
||||||
|
|
||||||
require () # $1 is a SFML module like 'system' or 'audio'
|
require () # $1 is a SFML module like 'system' or 'audio'
|
||||||
{
|
{
|
||||||
@ -616,45 +674,58 @@ require () # $1 is a SFML module like 'system' or 'audio'
|
|||||||
echo "no parameter! ERROR!"
|
echo "no parameter! ERROR!"
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
if [ $CONFIGURATION = "Debug" ]
|
# clean potentially old stuff
|
||||||
|
rm -f $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1.2.dylib
|
||||||
|
rm -f $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1-d.2.dylib
|
||||||
|
rm -f $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/sfml-$1.framework
|
||||||
|
|
||||||
|
# copy SFML libraries
|
||||||
|
if [ $frameworks ]
|
||||||
|
then
|
||||||
|
ditto /Library/Frameworks/sfml-$1.framework $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/sfml-$1.framework
|
||||||
|
elif [ $CONFIGURATION = "Debug" ]
|
||||||
then
|
then
|
||||||
rm -f $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1.2.dylib
|
|
||||||
ditto /usr/local/lib/libsfml-$1-d.2.dylib $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1-d.2.dylib
|
ditto /usr/local/lib/libsfml-$1-d.2.dylib $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1-d.2.dylib
|
||||||
else
|
else
|
||||||
rm -f $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1-d.2.dylib
|
|
||||||
ditto /usr/local/lib/libsfml-$1.2.dylib $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1.2.dylib
|
ditto /usr/local/lib/libsfml-$1.2.dylib $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/libsfml-$1.2.dylib
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $1 = "audio" ]
|
||||||
|
then
|
||||||
|
# copy sndfile framework too
|
||||||
|
ditto /Library/Frameworks/sndfile.framework $BUILT_PRODUCTS_DIR/test.app/Contents/Frameworks/sndfile.framework
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -n "$SYSTEM_RELEASE" ]
|
if [ -n "$SFML_SYSTEM" ]
|
||||||
then
|
then
|
||||||
require "system"
|
require "system"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$AUDIO_RELEASE" ]
|
if [ -n "$SFML_AUDIO" ]
|
||||||
then
|
then
|
||||||
require "audio"
|
require "audio"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$NETWORK_RELEASE" ]
|
if [ -n "$SFML_NETWORK" ]
|
||||||
then
|
then
|
||||||
require "network"
|
require "network"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$WINDOW_RELEASE" ]
|
if [ -n "$SFML_WINDOW" ]
|
||||||
then
|
then
|
||||||
require "window"
|
require "window"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$GRAPHICS_RELEASE" ]
|
if [ -n "$SFML_GRAPHICS" ]
|
||||||
then
|
then
|
||||||
require "graphics"
|
require "graphics"
|
||||||
fi
|
fi
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<key>RunOnlyForDeploymentPostprocessing</key>
|
<key>RunOnlyForDeploymentPostprocessing</key>
|
||||||
<string>NO</string>
|
<string>YES</string>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
@ -42,6 +42,64 @@ subject to the following restrictions:
|
|||||||
<!-- ############################################################### Options -->
|
<!-- ############################################################### Options -->
|
||||||
<key>Options</key>
|
<key>Options</key>
|
||||||
<array>
|
<array>
|
||||||
|
<!-- ****************************************** Framework option -->
|
||||||
|
<dict>
|
||||||
|
<key>Identifier</key>
|
||||||
|
<string>libraryType</string>
|
||||||
|
<key>Name</key>
|
||||||
|
<string>Use frameworks</string>
|
||||||
|
<key>Description</key>
|
||||||
|
<string>Indicates whether frameworks should be used instead of dylibs or not.</string>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>checkbox</string>
|
||||||
|
<key>SortOrder</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Default</key>
|
||||||
|
<string>false</string>
|
||||||
|
<key>Units</key>
|
||||||
|
<dict>
|
||||||
|
<!-- ON -->
|
||||||
|
<key>true</key>
|
||||||
|
<dict>
|
||||||
|
<!-- compilation options -->
|
||||||
|
<key>Project</key>
|
||||||
|
<dict>
|
||||||
|
<key>SharedSettings</key>
|
||||||
|
<dict>
|
||||||
|
<key>SFML_LINK_PREFIX</key>
|
||||||
|
<string>$(SFML_LINK_FRAMEWORKS_PREFIX)</string>
|
||||||
|
|
||||||
|
<key>SFML_LINK_SUFFIX</key>
|
||||||
|
<string>$(SFML_LINK_FRAMEWORKS_SUFFIX)</string>
|
||||||
|
|
||||||
|
<key>HEADER_SEARCH_PATHS</key>
|
||||||
|
<string>$(HEADER_SEARCH_PATHS)</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
<!-- OFF -->
|
||||||
|
<key>false</key>
|
||||||
|
<dict>
|
||||||
|
<!-- compilation options -->
|
||||||
|
<key>Project</key>
|
||||||
|
<dict>
|
||||||
|
<key>SharedSettings</key>
|
||||||
|
<dict>
|
||||||
|
<key>SFML_LINK_PREFIX</key>
|
||||||
|
<string>$(SFML_LINK_DYLIBS_PREFIX)</string>
|
||||||
|
|
||||||
|
<key>SFML_LINK_SUFFIX</key>
|
||||||
|
<string>$(SFML_LINK_DYLIBS_SUFFIX)</string>
|
||||||
|
|
||||||
|
<key>HEADER_SEARCH_PATHS</key>
|
||||||
|
<string>$(HEADER_SEARCH_PATHS) /usr/local/include/</string>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
|
|
||||||
<!-- ********************************************* Window Module -->
|
<!-- ********************************************* Window Module -->
|
||||||
<dict>
|
<dict>
|
||||||
<key>Identifier</key>
|
<key>Identifier</key>
|
||||||
@ -66,11 +124,8 @@ subject to the following restrictions:
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>WINDOW_RELEASE</key>
|
<key>SFML_WINDOW</key>
|
||||||
<string>-lsfml-window</string>
|
<string>$(SFML_LINK_PREFIX)sfml-window$(SFML_LINK_SUFFIX)</string>
|
||||||
|
|
||||||
<key>WINDOW_DEBUG</key>
|
|
||||||
<string>-lsfml-window-d</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
@ -99,10 +154,7 @@ subject to the following restrictions:
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>WINDOW_RELEASE</key>
|
<key>SFML_WINDOW</key>
|
||||||
<string></string>
|
|
||||||
|
|
||||||
<key>WINDOW_DEBUG</key>
|
|
||||||
<string></string>
|
<string></string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@ -157,11 +209,8 @@ subject to the following restrictions:
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>GRAPHICS_RELEASE</key>
|
<key>SFML_GRAPHICS</key>
|
||||||
<string>-lsfml-graphics</string>
|
<string>$(SFML_LINK_PREFIX)sfml-graphics$(SFML_LINK_SUFFIX)</string>
|
||||||
|
|
||||||
<key>GRAPHICS_DEBUG</key>
|
|
||||||
<string>-lsfml-graphics-d</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
@ -256,10 +305,7 @@ text.SetColor(sf::Color::Black);
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>GRAPHICS_RELEASE</key>
|
<key>SFML_GRAPHICS</key>
|
||||||
<string></string>
|
|
||||||
|
|
||||||
<key>GRAPHICS_DEBUG</key>
|
|
||||||
<string></string>
|
<string></string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@ -307,11 +353,8 @@ text.SetColor(sf::Color::Black);
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>AUDIO_RELEASE</key>
|
<key>SFML_AUDIO</key>
|
||||||
<string>-lsfml-audio</string>
|
<string>$(SFML_LINK_PREFIX)sfml-audio$(SFML_LINK_SUFFIX)</string>
|
||||||
|
|
||||||
<key>AUDIO_DEBUG</key>
|
|
||||||
<string>-lsfml-audio-d</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
@ -354,10 +397,7 @@ music.Play();
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>AUDIO_RELEASE</key>
|
<key>SFML_AUDIO</key>
|
||||||
<string></string>
|
|
||||||
|
|
||||||
<key>AUDIO_DEBUG</key>
|
|
||||||
<string></string>
|
<string></string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@ -399,11 +439,8 @@ music.Play();
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NETWORK_RELEASE</key>
|
<key>SFML_NETWORK</key>
|
||||||
<string>-lsfml-network</string>
|
<string>$(SFML_LINK_PREFIX)sfml-network$(SFML_LINK_SUFFIX)</string>
|
||||||
|
|
||||||
<key>NETWORK_DEBUG</key>
|
|
||||||
<string>-lsfml-network-d</string>
|
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
@ -424,10 +461,7 @@ music.Play();
|
|||||||
<dict>
|
<dict>
|
||||||
<key>SharedSettings</key>
|
<key>SharedSettings</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NETWORK_RELEASE</key>
|
<key>SFML_NETWORK</key>
|
||||||
<string></string>
|
|
||||||
|
|
||||||
<key>NETWORK_DEBUG</key>
|
|
||||||
<string></string>
|
<string></string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@ -554,13 +588,23 @@ while (window.IsOpened())
|
|||||||
<key>PRODUCT_NAME</key>
|
<key>PRODUCT_NAME</key>
|
||||||
<string>$(TARGET_NAME)</string>
|
<string>$(TARGET_NAME)</string>
|
||||||
|
|
||||||
<key>SYSTEM_RELEASE</key>
|
<key>SFML_LINK_DYLIBS_PREFIX</key>
|
||||||
<string>-lsfml-system</string>
|
<string>-l</string>
|
||||||
<key>SYSTEM_DEBUG</key>
|
|
||||||
<string>-lsfml-system-d</string>
|
<key>SFML_LINK_FRAMEWORKS_PREFIX</key>
|
||||||
|
<string>-framework </string>
|
||||||
<key>HEADER_SEARCH_PATHS</key>
|
|
||||||
<string>$(HEADER_SEARCH_PATHS) /usr/local/include/</string>
|
<key>SFML_SYSTEM</key>
|
||||||
|
<string>$(SFML_LINK_PREFIX)sfml-system$(SFML_LINK_SUFFIX)</string>
|
||||||
|
|
||||||
|
<key>SFML_LINK_FRAMEWORKS_SUFFIX</key>
|
||||||
|
<string></string>
|
||||||
|
|
||||||
|
<key>CLANG_ENABLE_OBJC_ARC</key>
|
||||||
|
<string></string>
|
||||||
|
|
||||||
|
<key>GCC_ENABLE_OBJC_GC</key>
|
||||||
|
<string>unsupported</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
<key>Configurations</key>
|
<key>Configurations</key>
|
||||||
@ -568,16 +612,22 @@ while (window.IsOpened())
|
|||||||
<!-- ***************************************************** Debug -->
|
<!-- ***************************************************** Debug -->
|
||||||
<key>Debug</key>
|
<key>Debug</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>SFML_LINK_DYLIBS_SUFFIX</key>
|
||||||
|
<string>-d</string>
|
||||||
|
|
||||||
<key>OTHER_LDFLAGS</key>
|
<key>OTHER_LDFLAGS</key>
|
||||||
<string>$(OTHER_LDFLAGS) $(SYSTEM_DEBUG) $(WINDOW_DEBUG) $(GRAPHICS_DEBUG) $(AUDIO_DEBUG) $(NETWORK_DEBUG)</string>
|
<string>$(OTHER_LDFLAGS) $(SFML_SYSTEM) $(SFML_WINDOW) $(SFML_GRAPHICS) $(SFML_AUDIO) $(SFML_NETWORK)</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
|
|
||||||
<!-- *************************************************** Release -->
|
<!-- *************************************************** Release -->
|
||||||
<key>Release</key>
|
<key>Release</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>SFML_LINK_DYLIBS_SUFFIX</key>
|
||||||
|
<string></string>
|
||||||
|
|
||||||
<key>OTHER_LDFLAGS</key>
|
<key>OTHER_LDFLAGS</key>
|
||||||
<string>$(OTHER_LDFLAGS) $(SYSTEM_RELEASE) $(WINDOW_RELEASE) $(GRAPHICS_RELEASE) $(AUDIO_RELEASE) $(NETWORK_RELEASE)</string>
|
<string>$(OTHER_LDFLAGS) $(SFML_SYSTEM) $(SFML_WINDOW) $(SFML_GRAPHICS) $(SFML_AUDIO) $(SFML_NETWORK)</string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
@ -1,43 +1,66 @@
|
|||||||
XCODE 4 TEMPLATES
|
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
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
* You can choose between command line tool or bundle application.
|
* 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.
|
* You can choose between using SFML libraries as dylibs or frameworks.
|
||||||
* A basic example is inserted automatically into your project's code.
|
* 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
|
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
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
To use these templates follow these steps :
|
To use these templates follow these steps :
|
||||||
|
|
||||||
* open Xcode 4,
|
1. open Xcode 4,
|
||||||
* select «create a new Xcode project» from the «Welcome to Xcode» window or select menu File > New > New Project,
|
2. select "create a new Xcode project" from the "Welcome to Xcode" window or select menus File > New > New Project,
|
||||||
* select «Templates» under «Mac OS X»,
|
3. select "SFML" subsection under "Mac OS X",
|
||||||
* then select either «SFML Application» or «SFML Command Line Tool»,
|
4. then select either "SFML Application" or "SFML Command Line Tool",
|
||||||
* fill in the requested information and you're done.
|
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),
|
1. select your project from the project navigator panel,
|
||||||
* select your project's target on the main area,
|
2. select your project's target on the main area,
|
||||||
* go to the «Build Settings» tab,
|
3. go to the "Build Settings" tab,
|
||||||
* go down to the bottom,
|
4. go down to the bottom,
|
||||||
* edit any MODULEX_CONFIG variable (e.g. AUDIO_DEBUG, NETWORK_RELEASE) you want to.
|
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.
|
* I changed my mind and would like to switch from dylibs to frameworks or vice versa. How can I do that ?
|
||||||
* to add the network module set NETWORK_DEBUG to '-lsfml-network-d' and NETWORK_RELEASE to '-lsfml-network'.
|
|
||||||
|
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…
Reference in New Issue
Block a user