SFML patch for gcc 4.9 on ubuntu was broken with updated SFML cmake script

This commit is contained in:
Bruno Van de Velde 2018-03-30 23:14:20 +02:00
parent ad20ff4db2
commit 48164c8499

View File

@ -1,19 +1,14 @@
diff --git a/src/SFML/Graphics/CMakeLists.txt b/src/SFML/Graphics/CMakeLists.txt diff --git a/src/SFML/Graphics/CMakeLists.txt b/src/SFML/Graphics/CMakeLists.txt
index 6f02fb6..bdc84e7 100644 index 883c7581..07007a10 100644
--- a/src/SFML/Graphics/CMakeLists.txt --- a/src/SFML/Graphics/CMakeLists.txt
+++ b/src/SFML/Graphics/CMakeLists.txt +++ b/src/SFML/Graphics/CMakeLists.txt
@@ -148,6 +148,13 @@ add_definitions(-DSTBI_FAILURE_USERMSG) @@ -145,3 +145,9 @@ target_compile_definitions(sfml-graphics PRIVATE "STBI_FAILURE_USERMSG")
# when gcc is used; otherwise saving PNGs may crash in stb_image_write
if(SFML_COMPILER_GCC) if(SFML_COMPILER_GCC)
set_source_files_properties(${SRCROOT}/ImageLoader.cpp PROPERTIES COMPILE_FLAGS -fno-strict-aliasing) set_source_files_properties(${SRCROOT}/ImageLoader.cpp PROPERTIES COMPILE_FLAGS -fno-strict-aliasing)
+ endif()
+endif()
+ +
+# see https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899 +# see https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899
+if(SFML_COMPILER_GCC AND BUILD_SHARED_LIBS) +if(SFML_COMPILER_GCC AND BUILD_SHARED_LIBS)
+ message(WARNING "Applying workaround for https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899") + message(WARNING "Applying workaround for https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899")
+ list(APPEND GRAPHICS_EXT_LIBS "-lgcc_s -lgcc") + list(APPEND GRAPHICS_EXT_LIBS "-lgcc_s -lgcc")
endif() +endif()
# define the sfml-graphics target