summaryrefslogtreecommitdiff
path: root/Ports/openrct2/patches/0005-Don-t-try-linking-to-stdc-fs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Ports/openrct2/patches/0005-Don-t-try-linking-to-stdc-fs.patch')
-rw-r--r--Ports/openrct2/patches/0005-Don-t-try-linking-to-stdc-fs.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/Ports/openrct2/patches/0005-Don-t-try-linking-to-stdc-fs.patch b/Ports/openrct2/patches/0005-Don-t-try-linking-to-stdc-fs.patch
new file mode 100644
index 0000000000..e745827918
--- /dev/null
+++ b/Ports/openrct2/patches/0005-Don-t-try-linking-to-stdc-fs.patch
@@ -0,0 +1,23 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Julian=20Offenh=C3=A4user?= <offenhaeuser@protonmail.com>
+Date: Tue, 7 Feb 2023 22:16:32 +0100
+Subject: [PATCH] Don't try linking to stdc++fs
+
+This code tried to link to stdc++fs for std::filesystem features, which are already included in our toolchain.
+---
+ src/openrct2/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt
+index 6a1a1f081a0131d0cd93b558802989804ba4df67..377c62dbd70fe359bf58f7dddd5c302c8f1a15a4 100644
+--- a/src/openrct2/CMakeLists.txt
++++ b/src/openrct2/CMakeLists.txt
+@@ -38,7 +38,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
+ SET_CHECK_CXX_FLAGS(${PROJECT_NAME})
+
+ # GCC / Clang likes us to pass the -lstdc++fs flag to link C++17 filesystem implementation.
+-if (NOT MINGW AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
++if (NOT MINGW AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SerenityOS")
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ target_link_libraries(${PROJECT_NAME} stdc++fs)
+ endif()