From 9d5f9ae23026ec4509d44ad9d4b5c1a9ca452541 Mon Sep 17 00:00:00 2001 From: Klemens Nanni Date: Sat, 9 Jul 2022 13:24:49 +0400 Subject: [PATCH 1/2] Do not link against asound on OpenBSD There is no ALSA port for this system. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b55905..26a6fc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,10 @@ else () set(BZC_PROJECT_LIBS ${BZC_PROJECT_LIBS} Threads::Threads) endif () - set(PLATFORM_LIBS GL asound fontconfig) + set(PLATFORM_LIBS GL fontconfig) + if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD") + list(APPEND PLATFORM_LIBS asound) + endif () endif () ############################################################################## From 54b0257824114a36be98d730ac1977ca706f35c5 Mon Sep 17 00:00:00 2001 From: Klemens Nanni Date: Sat, 9 Jul 2022 13:30:01 +0400 Subject: [PATCH 2/2] Use dummy MIDI implementation on OpenBSD The X11 implementation uses ALSA for which is not ported to this system. --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26a6fc2..08feb6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -335,12 +335,20 @@ elseif (UNIX) set(BZC_PLATFORM_SRCS ${CMAKE_SOURCE_DIR}/src/platform_glfw/Renderer.cpp ${CMAKE_SOURCE_DIR}/src/platform_common/FFT.cpp - ${CMAKE_SOURCE_DIR}/src/platform_x11/MIDI.cpp ${CMAKE_SOURCE_DIR}/src/platform_x11/Misc.cpp ${CMAKE_SOURCE_DIR}/src/platform_x11/SetupDialog.cpp ${CMAKE_SOURCE_DIR}/src/platform_x11/Timer.cpp ${CMAKE_SOURCE_DIR}/src/platform_x11/Clipboard.cpp ) + if ("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD") + list(APPEND BZC_PLATFORM_SRCS + ${CMAKE_SOURCE_DIR}/src/platform_common/MIDIDummy.cpp + ) + else () + list(APPEND BZC_PLATFORM_SRCS + ${CMAKE_SOURCE_DIR}/src/platform_x11/MIDI.cpp + ) + endif () source_group("Bonzomatic\\Platform" FILES ${BZC_PLATFORM_SRCS}) elseif (WIN32) if (${BONZOMATIC_WINDOWS_FLAVOR} MATCHES "DX11")