From 7fec13ac7418a4ce0ed63418ed16107b4668dc16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 11 Feb 2018 21:25:42 +0100 Subject: [PATCH] Apply workaround for old compilers https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899 --- src/openrct2/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index bad62756c4..5d424f9927 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -106,6 +106,13 @@ if (NOT DISABLE_NETWORK) endif () endif () +if (NOT APPLE AND NOT MINGW) + # This is ugly hack to work around https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899. + # Once C++17 is enabled (and thus old compilers are no longer supported, this needs to be gone. + # We cannot simply detect the _compiler_ version, as the bug exists with the C++ _library_ + target_link_libraries(${PROJECT} gcc_s gcc) +endif () + if (NOT DISABLE_TTF) if (STATIC) target_link_libraries(${PROJECT} ${FREETYPE_STATIC_LIBRARIES})