Enhanced cmake part for OpenBSD (#3086)

* Fixed compile on OpenBSD

* Changed to not use seperate UNIX for cmake
This commit is contained in:
RayIT 2023-05-28 14:49:33 +02:00 committed by GitHub
parent 4a371a5197
commit 15cbf313bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,14 +43,15 @@ if (${PLATFORM} MATCHES "Desktop")
if ("${OPENGL_LIBRARIES}" STREQUAL "") if ("${OPENGL_LIBRARIES}" STREQUAL "")
set(OPENGL_LIBRARIES "GL") set(OPENGL_LIBRARIES "GL")
endif () endif ()
set(LIBS_PRIVATE m atomic pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD") if ("${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD")
find_library(OSS_LIBRARY ossaudio) find_library(OSS_LIBRARY ossaudio)
set(LIBS_PRIVATE m pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY})
endif () endif ()
set(LIBS_PRIVATE m atomic pthread ${OPENGL_LIBRARIES} ${OSS_LIBRARY}) if (NOT "${CMAKE_SYSTEM_NAME}" MATCHES "(Net|Open)BSD" AND USE_AUDIO)
if (USE_AUDIO)
set(LIBS_PRIVATE ${LIBS_PRIVATE} dl) set(LIBS_PRIVATE ${LIBS_PRIVATE} dl)
endif () endif ()
endif () endif ()