From 6f517b66635495ccbd455bc85b799ac231944b56 Mon Sep 17 00:00:00 2001 From: casey langen Date: Thu, 8 Dec 2022 00:45:06 -0800 Subject: [PATCH] Fix OpenBSD build --- .cmake/ConfigureBsdPaths.cmake | 3 +++ src/musikcube/CMakeLists.txt | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.cmake/ConfigureBsdPaths.cmake b/.cmake/ConfigureBsdPaths.cmake index 362ad5088..7b14ee904 100644 --- a/.cmake/ConfigureBsdPaths.cmake +++ b/.cmake/ConfigureBsdPaths.cmake @@ -24,4 +24,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin" OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR "${BSD_PATH_PREFIX}/lib" "${BSD_PATH_PREFIX}/opt/openssl/lib" "${BSD_PATH_PREFIX}/opt/ncurses/lib") + + include_directories("${BSD_PATH_PREFIX}/include") + link_directories("${BSD_PATH_PREFIX}/lib") endif () \ No newline at end of file diff --git a/src/musikcube/CMakeLists.txt b/src/musikcube/CMakeLists.txt index 802666c0a..e92789a2c 100644 --- a/src/musikcube/CMakeLists.txt +++ b/src/musikcube/CMakeLists.txt @@ -104,9 +104,14 @@ if (APPLE) set(PANEL_LIBRARY_NAME "lib${PANEL_LIBRARY_NAME}.a") endif() else() - message(STATUS "[ncurses] not Darwin! will attempt to link against libtinfo") - find_library(LIBTINFO NAMES tinfo) - message(STATUS "[musikcube] using libtinfo at: " ${LIBTINFO}) + if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD") + message(STATUS "[ncurses] detected OpenBSD, unsetting LIBTINFO") + set(LIBTINFO "") + else() + message(STATUS "[ncurses] not Darwin! will attempt to link against libtinfo") + find_library(LIBTINFO NAMES tinfo) + message(STATUS "[musikcube] using libtinfo at: " ${LIBTINFO}) + endif() endif() find_library(LIBNCURSES NAMES ${CURSES_LIBRARY_NAME} PATHS ${VENDOR_LINK_DIRECTORIES})