From 6e5359d19b2b08cf426e23300a829c7e6230be49 Mon Sep 17 00:00:00 2001 From: rayit Date: Sun, 28 May 2023 11:27:52 +0200 Subject: [PATCH] Fixed compile on OpenBSD --- cmake/LibraryConfigurations.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmake/LibraryConfigurations.cmake b/cmake/LibraryConfigurations.cmake index ffb1a047d979..a54261d27abd 100644 --- a/cmake/LibraryConfigurations.cmake +++ b/cmake/LibraryConfigurations.cmake @@ -25,6 +25,18 @@ if (${PLATFORM} MATCHES "Desktop") add_definitions(-D_CRT_SECURE_NO_WARNINGS) find_package(OpenGL QUIET) set(LIBS_PRIVATE ${OPENGL_LIBRARIES} winmm) + elseif (UNIX) + find_library(pthread NAMES pthread) + find_package(OpenGL QUIET) + if ("${OPENGL_LIBRARIES}" STREQUAL "") + set(OPENGL_LIBRARIES "GL") + endif () + + if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD") + find_library(OSS_LIBRARY ossaudio) + endif () + + set(LIBS_PRIVATE m pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY}) else () find_library(pthread NAMES pthread) find_package(OpenGL QUIET)