mirror of
https://github.com/SFML/SFML.git
synced 2024-11-29 06:41:05 +08:00
Merge branch 'master' of github.com:LaurentGomila/SFML
This commit is contained in:
commit
ad42adbba0
@ -143,6 +143,12 @@ macro(sfml_add_library target)
|
|||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
# in shared build, we use the regular linker commands
|
# in shared build, we use the regular linker commands
|
||||||
target_link_libraries(${target} ${THIS_EXTERNAL_LIBS})
|
target_link_libraries(${target} ${THIS_EXTERNAL_LIBS})
|
||||||
|
|
||||||
|
if (MACOSX)
|
||||||
|
set_target_properties(${target} PROPERTIES
|
||||||
|
BUILD_WITH_INSTALL_RPATH 1
|
||||||
|
INSTALL_NAME_DIR "@executable_path/../Frameworks")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
# in static build there's no link stage, but with some compilers it is possible to force
|
# in static build there's no link stage, but with some compilers it is possible to force
|
||||||
# the generated static library to directly contain the symbols from its dependencies
|
# the generated static library to directly contain the symbols from its dependencies
|
||||||
|
Binary file not shown.
@ -83,7 +83,7 @@ if(BUILD_SHARED_LIBS)
|
|||||||
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${X11_LIBRARIES})
|
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${X11_LIBRARIES})
|
||||||
elseif(MACOSX)
|
elseif(MACOSX)
|
||||||
# We use static version of freetype so we need to link against zlib.
|
# We use static version of freetype so we need to link against zlib.
|
||||||
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${ZLIB_LIBRARIES} "-framework AGL")
|
set(GRAPHICS_EXT_LIBS ${GRAPHICS_EXT_LIBS} ${ZLIB_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -236,6 +236,7 @@
|
|||||||
-(void)dealloc
|
-(void)dealloc
|
||||||
{
|
{
|
||||||
[self closeWindow];
|
[self closeWindow];
|
||||||
|
[NSMenu setMenuBarVisible:YES];
|
||||||
|
|
||||||
[myWindow release];
|
[myWindow release];
|
||||||
[myOGLView release];
|
[myOGLView release];
|
||||||
|
@ -179,16 +179,16 @@ sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
|
|||||||
<key>main.cpp:main:image_init</key>
|
<key>main.cpp:main:image_init</key>
|
||||||
<string>
|
<string>
|
||||||
// Load a sprite to display
|
// Load a sprite to display
|
||||||
sf::Image image;
|
sf::Texture texture;
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<key>main.cpp:main:image_finalize</key>
|
<key>main.cpp:main:image_finalize</key>
|
||||||
<string> return EXIT_FAILURE;
|
<string> return EXIT_FAILURE;
|
||||||
sf::Sprite sprite(image);
|
sf::Sprite sprite(texture);
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<key>main.cpp:main:image_load</key>
|
<key>main.cpp:main:image_load</key>
|
||||||
<string>if (!image.LoadFromFile(ResourcePath() + "cute_image.jpg"))</string>
|
<string>if (!texture.LoadFromFile(ResourcePath() + "cute_image.jpg"))</string>
|
||||||
|
|
||||||
<key>main.cpp:main:text_init</key>
|
<key>main.cpp:main:text_init</key>
|
||||||
<string>
|
<string>
|
||||||
@ -227,7 +227,7 @@ text.SetColor(sf::Color::Black);
|
|||||||
<key>sansation.ttf</key>
|
<key>sansation.ttf</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Group</key>
|
<key>Group</key>
|
||||||
<string>Supporting Files</string>
|
<string>Resources</string>
|
||||||
<key>Path</key>
|
<key>Path</key>
|
||||||
<string>sansation.ttf</string>
|
<string>sansation.ttf</string>
|
||||||
</dict>
|
</dict>
|
||||||
@ -235,7 +235,7 @@ text.SetColor(sf::Color::Black);
|
|||||||
<key>cute_image.jpg</key>
|
<key>cute_image.jpg</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Group</key>
|
<key>Group</key>
|
||||||
<string>Supporting Files</string>
|
<string>Resources</string>
|
||||||
<key>Path</key>
|
<key>Path</key>
|
||||||
<string>cute_image.jpg</string>
|
<string>cute_image.jpg</string>
|
||||||
</dict>
|
</dict>
|
||||||
@ -334,7 +334,7 @@ music.Play();
|
|||||||
<key>nice_music.ogg</key>
|
<key>nice_music.ogg</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>Group</key>
|
<key>Group</key>
|
||||||
<string>Supporting Files</string>
|
<string>Resources</string>
|
||||||
<key>Path</key>
|
<key>Path</key>
|
||||||
<string>nice_music.ogg</string>
|
<string>nice_music.ogg</string>
|
||||||
</dict>
|
</dict>
|
||||||
@ -370,6 +370,9 @@ music.Play();
|
|||||||
|
|
||||||
<key>main.cpp:main:audio:content</key>
|
<key>main.cpp:main:audio:content</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
|
|
||||||
|
<key>main.cpp:main:audio_loop</key>
|
||||||
|
<string></string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
@ -501,9 +504,10 @@ int main (int argc, const char * argv[])
|
|||||||
<dict>
|
<dict>
|
||||||
<key>Path</key>
|
<key>Path</key>
|
||||||
<string>ResourcePath.hpp</string>
|
<string>ResourcePath.hpp</string>
|
||||||
|
<key>TargetIndices</key>
|
||||||
|
<array/>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
||||||
|
|
||||||
<key>main.cpp:system:include</key>
|
<key>main.cpp:system:include</key>
|
||||||
<string>#include <SFML/System.hpp></string>
|
<string>#include <SFML/System.hpp></string>
|
||||||
|
|
||||||
@ -591,6 +595,68 @@ while (window.IsOpened())
|
|||||||
<array>
|
<array>
|
||||||
<string>Foundation</string>
|
<string>Foundation</string>
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
|
<key>BuildPhases</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>Class</key>
|
||||||
|
<string>ShellScript</string>
|
||||||
|
|
||||||
|
<key>ShellPath</key>
|
||||||
|
<string>/bin/sh</string>
|
||||||
|
|
||||||
|
<key>ShellScript</key>
|
||||||
|
<string># This shell script simply copies required sfml dylibs 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.
|
||||||
|
|
||||||
|
require () # $1 is a SFML module like 'system' or 'audio'
|
||||||
|
{
|
||||||
|
if [ -z $1 ]
|
||||||
|
then
|
||||||
|
echo "no parameter! ERROR!"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
if [ $CONFIGURATION = "Debug" ]
|
||||||
|
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
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -n "$SYSTEM_RELEASE" ]
|
||||||
|
then
|
||||||
|
require "system"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$AUDIO_RELEASE" ]
|
||||||
|
then
|
||||||
|
require "audio"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$NETWORK_RELEASE" ]
|
||||||
|
then
|
||||||
|
require "network"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$WINDOW_RELEASE" ]
|
||||||
|
then
|
||||||
|
require "window"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$GRAPHICS_RELEASE" ]
|
||||||
|
then
|
||||||
|
require "graphics"
|
||||||
|
fi
|
||||||
|
</string>
|
||||||
|
|
||||||
|
<key>RunOnlyForDeploymentPostprocessing</key>
|
||||||
|
<string>NO</string>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
|
@ -179,16 +179,16 @@ sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
|
|||||||
<key>main.cpp:main:image_init</key>
|
<key>main.cpp:main:image_init</key>
|
||||||
<string>
|
<string>
|
||||||
// Load a sprite to display
|
// Load a sprite to display
|
||||||
sf::Image image;
|
sf::Texture texture;
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<key>main.cpp:main:image_finalize</key>
|
<key>main.cpp:main:image_finalize</key>
|
||||||
<string> return EXIT_FAILURE;
|
<string> return EXIT_FAILURE;
|
||||||
sf::Sprite sprite(image);
|
sf::Sprite sprite(texture);
|
||||||
</string>
|
</string>
|
||||||
|
|
||||||
<key>main.cpp:main:image_load</key>
|
<key>main.cpp:main:image_load</key>
|
||||||
<string>if (!image.LoadFromFile("cute_image.jpg"))</string>
|
<string>if (!texture.LoadFromFile("cute_image.jpg"))</string>
|
||||||
|
|
||||||
<key>main.cpp:main:text_init</key>
|
<key>main.cpp:main:text_init</key>
|
||||||
<string>
|
<string>
|
||||||
|
Loading…
Reference in New Issue
Block a user