Fix build on OpenBSD (#11870)

Co-authored-by: ibara <ibara@users.noreply.github.com>
Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
This commit is contained in:
authored and GitHub committed 2020-06-12 16:45:22 +02:00
1 parent 3530a00998
commit 082dfc4bb0
1 file changed
+5 -1
+5 -1
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 AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
if (NOT MINGW AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_libraries(${PROJECT_NAME} stdc++fs)
endif()
@@ -189,6 +189,10 @@ if (NOT DISABLE_TTF)
target_link_libraries(${PROJECT_NAME} ${FONTCONFIG_LIBRARIES})
endif ()
endif ()
if (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
target_link_libraries(${PROJECT_NAME} -L${OPENBSD_X11BASE}/lib)
endif ()
endif ()
if (HAVE_DISCORD_RPC)