From 5bdf0113d7bc5a519db3fb3b4724de95a7863450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20G=C3=BCnzler?= Date: Wed, 27 Oct 2021 16:39:15 +0200 Subject: [PATCH] cmake: fix build against ncurses with separate libtinfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tested this on openbsd as well: https://github.com/robertgzr/musikcube/tree/bsd https://builds.sr.ht/~robertgzr/job/623049 Signed-off-by: Robert Günzler --- src/musikcube/CMakeLists.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/musikcube/CMakeLists.txt b/src/musikcube/CMakeLists.txt index 916fe1960..d34b6336c 100644 --- a/src/musikcube/CMakeLists.txt +++ b/src/musikcube/CMakeLists.txt @@ -104,20 +104,14 @@ else() find_package(PkgConfig) if (${NCURSES_DISABLE_LIB_SUFFIXES} MATCHES "true") # pkg_check_modules fails on some systems, including OpenBSD. - # pkg_check_modules(NCURSES REQUIRED ncurses panel) - ensure_library_exists(ncurses) - ensure_library_exists(panel) - set(NCURSES_LIBRARIES ncurses panel) + pkg_check_modules(NCURSES REQUIRED ncurses panel) message(STATUS "[ncurses] using library names without 'w' prefix") else() # pkg_check_modules fails on some systems, including OpenBSD. - # pkg_check_modules(NCURSES REQUIRED ncursesw panelw) - ensure_library_exists(ncursesw) - ensure_library_exists(panelw) - set(NCURSES_LIBRARIES ncursesw panelw) + pkg_check_modules(NCURSES REQUIRED ncursesw panelw) message(STATUS "[ncurses] using library names with 'w' prefix") endif() - target_link_libraries(musikcube ${musikcube_LINK_LIBS} ${NCURSES_LIBRARIES} musikcore) + target_link_libraries(musikcube ${musikcube_LINK_LIBS} ${NCURSES_LINK_LIBRARIES} musikcore) endif() if (ENABLE_PCH MATCHES "true")