1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 14:54:30 +01:00

Fix build on FreeBSD (#11145)

FreeBSD doesn't use libstdc++, but libc++. stdc++fs doesn't exist in libc++.
This commit is contained in:
pkubaj
2020-03-29 21:36:50 +00:00
committed by GitHub
parent d1faa228c5
commit c8f9324e41

View File

@@ -23,7 +23,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)
if (NOT MINGW AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_libraries(${PROJECT_NAME} stdc++fs)
endif()