Fixed crash when saving PNG images with gcc

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1628 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-11-08 22:22:17 +00:00
parent 9f386d038b
commit 95eda37e47

View File

@ -97,6 +97,12 @@ endif()
# add preprocessor symbols
add_definitions(-DGLEW_STATIC -DSTBI_FAILURE_USERMSG)
# ImageLoader.cpp must be compiled with the -fno-strict-aliasing
# when gcc is used; otherwise saving PNGs may crash in stb_image_write
if(COMPILER_GCC)
set_source_files_properties(${SRCROOT}/ImageLoader.cpp PROPERTIES COMPILE_FLAGS -fno-strict-aliasing)
endif()
# define the sfml-graphics target
sfml_add_library(sfml-graphics
SOURCES ${SRC}