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

0.8
Bruno Van de Velde 2018-03-30 23:14:20 +02:00
parent ad20ff4db2
commit 48164c8499
1 changed files with 4 additions and 9 deletions

View File

@ -1,19 +1,14 @@
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
+++ b/src/SFML/Graphics/CMakeLists.txt
@@ -148,6 +148,13 @@ add_definitions(-DSTBI_FAILURE_USERMSG)
# when gcc is used; otherwise saving PNGs may crash in stb_image_write
@@ -145,3 +145,9 @@ target_compile_definitions(sfml-graphics PRIVATE "STBI_FAILURE_USERMSG")
if(SFML_COMPILER_GCC)
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
+if(SFML_COMPILER_GCC AND BUILD_SHARED_LIBS)
+ message(WARNING "Applying workaround for https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899")
+ list(APPEND GRAPHICS_EXT_LIBS "-lgcc_s -lgcc")
endif()
# define the sfml-graphics target
+endif()