mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 14:21:04 +08:00
Fixed Xcode templates to work with any SOVERSION
This commit is contained in:
parent
1c46ec7c37
commit
2a8015be93
@ -25,7 +25,7 @@ subject to the following restrictions:
|
||||
-->
|
||||
|
||||
<!--
|
||||
This template can create a SFML 2.0 Bundle Application project.
|
||||
This template can create a SFML 2 Bundle Application project.
|
||||
-->
|
||||
|
||||
<plist version="1.0">
|
||||
@ -142,10 +142,10 @@ subject to the following restrictions:
|
||||
<string>/bin/sh</string>
|
||||
|
||||
<key>ShellScript</key>
|
||||
<string># This shell script simply copies required sfml dylibs/frameworks into the application bundle frameworks folder.
|
||||
<string># This shell script simply copies required SFML dylibs/frameworks into the application bundle frameworks folder.
|
||||
# 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 ?
|
||||
# Are we building a project that uses frameworks or dylibs?
|
||||
case "$SFML_BINARY_TYPE" in
|
||||
DYLIBS)
|
||||
frameworks="false"
|
||||
@ -176,12 +176,12 @@ assert () # $1 is a boolean, $2...N is an error message
|
||||
fi
|
||||
}
|
||||
|
||||
force_remove () # $1 is a path
|
||||
force_remove () # $@ is some paths
|
||||
{
|
||||
test $# -eq 1
|
||||
assert $? "force_remove() requires one parameter"
|
||||
rm -fr "$1"
|
||||
assert $? "couldn't remove $1"
|
||||
test $# -ge 1
|
||||
assert $? "force_remove() requires at least one parameter"
|
||||
rm -fr $@
|
||||
assert $? "couldn't remove $@"
|
||||
}
|
||||
|
||||
copy () # $1 is a source, $2 is a destination
|
||||
@ -201,28 +201,31 @@ require () # $1 is a SFML module like 'system' or 'audio'
|
||||
error "require() requires one parameter!"
|
||||
else
|
||||
# clean potentially old stuff
|
||||
force_remove "$dest/libsfml-$1.2.dylib"
|
||||
force_remove "$dest/libsfml-$1-d.2.dylib"
|
||||
force_remove "$dest/libsfml-$1"*
|
||||
force_remove "$dest/sfml-$1.framework"
|
||||
|
||||
# copy SFML libraries
|
||||
if [ "$frameworks" = "true" ]
|
||||
then
|
||||
copy "/Library/Frameworks/sfml-$1.framework" "$dest/sfml-$1.framework"
|
||||
source="/Library/Frameworks/sfml-$1.framework"
|
||||
target="sfml-$1.framework"
|
||||
elif [ "$SFML_LINK_DYLIBS_SUFFIX" = "-d" ]
|
||||
then
|
||||
copy "/usr/local/lib/libsfml-$1-d.2.dylib" "$dest/libsfml-$1-d.2.dylib"
|
||||
source="/usr/local/lib/libsfml-$1-d.dylib"
|
||||
target="`readlink $source`"
|
||||
else
|
||||
copy "/usr/local/lib/libsfml-$1.2.dylib" "$dest/libsfml-$1.2.dylib"
|
||||
source="/usr/local/lib/libsfml-$1.dylib"
|
||||
target="`readlink $source`"
|
||||
fi
|
||||
|
||||
copy "$source" "$dest/$target"
|
||||
|
||||
# copy extra dependencies
|
||||
if [ "$1" = "audio" ]
|
||||
then
|
||||
# copy sndfile framework too
|
||||
copy "/Library/Frameworks/sndfile.framework" "$dest/sndfile.framework"
|
||||
fi
|
||||
|
||||
if [ "$1" = "graphics" ]
|
||||
elif [ "$1" = "graphics" ]
|
||||
then
|
||||
# copy freetype framework too
|
||||
copy "/Library/Frameworks/freetype.framework" "$dest/freetype.framework"
|
||||
|
@ -25,7 +25,7 @@ subject to the following restrictions:
|
||||
-->
|
||||
|
||||
<!--
|
||||
This template can create a SFML 2.0 Command Line Tool project.
|
||||
This template can create a SFML 2 Command Line Tool project.
|
||||
-->
|
||||
|
||||
<plist version="1.0">
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
XCODE 4 & 5 TEMPLATES FOR SFML 2
|
||||
================================
|
||||
XCODE TEMPLATES FOR SFML 2
|
||||
==========================
|
||||
|
||||
These templates help you to easily create a new SFML 2 project for Xcode 4 or Xcode 5.
|
||||
These templates help you to easily create a new SFML 2 project for Xcode 4 or greater.
|
||||
|
||||
|
||||
|
||||
@ -36,9 +36,9 @@ Prerequisites
|
||||
|
||||
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 framework or dylib binaries
|
||||
- Xcode 4 or greater, up to date
|
||||
- the Command Line Tools
|
||||
- SFML 2, either as frameworks or dylibs
|
||||
|
||||
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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user