Fix OpenBSD build

This commit is contained in:
casey langen 2022-12-08 00:45:06 -08:00
parent 4388bb5100
commit 6f517b6663
2 changed files with 11 additions and 3 deletions

View File

@ -24,4 +24,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin" OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR
"${BSD_PATH_PREFIX}/lib" "${BSD_PATH_PREFIX}/lib"
"${BSD_PATH_PREFIX}/opt/openssl/lib" "${BSD_PATH_PREFIX}/opt/openssl/lib"
"${BSD_PATH_PREFIX}/opt/ncurses/lib") "${BSD_PATH_PREFIX}/opt/ncurses/lib")
include_directories("${BSD_PATH_PREFIX}/include")
link_directories("${BSD_PATH_PREFIX}/lib")
endif () endif ()

View File

@ -104,9 +104,14 @@ if (APPLE)
set(PANEL_LIBRARY_NAME "lib${PANEL_LIBRARY_NAME}.a") set(PANEL_LIBRARY_NAME "lib${PANEL_LIBRARY_NAME}.a")
endif() endif()
else() else()
message(STATUS "[ncurses] not Darwin! will attempt to link against libtinfo") if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
find_library(LIBTINFO NAMES tinfo) message(STATUS "[ncurses] detected OpenBSD, unsetting LIBTINFO")
message(STATUS "[musikcube] using libtinfo at: " ${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() endif()
find_library(LIBNCURSES NAMES ${CURSES_LIBRARY_NAME} PATHS ${VENDOR_LINK_DIRECTORIES}) find_library(LIBNCURSES NAMES ${CURSES_LIBRARY_NAME} PATHS ${VENDOR_LINK_DIRECTORIES})