From a4401283cb997dd4d14e7eccd8799200f6577caa Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Sun, 1 Nov 2026 00:13:45 +0200 Subject: [PATCH] build: find ncurses headers and the 32-bit ncurses lib on Arch CMake 4.4's FindCurses leaves CURSES_HAVE_* unset on this system, so the HAVE_CURSES_H fallback keeps viocalls compiling. Also fall back to /usr/lib32/libncursesw.so.6 when the hard-coded Debian path is absent. --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7254ef3..2d5af3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,8 @@ elseif(CURSES_HAVE_CURSES_H) add_definitions(-DHAVE_CURSES_H) elseif(CURSES_HAVE_NCURSES_CURSES_H) add_definitions(-DHAVE_NCURSESW_NCURSES_H) +else() + add_definitions(-DHAVE_CURSES_H) endif() # !!! FIXME @@ -97,7 +99,11 @@ endforeach() target_link_libraries(doscalls "pthread") # FIXME target_link_libraries(viocalls ${CURSES_LIBRARIES}) -target_link_libraries(viocalls /usr/lib/i386-linux-gnu/libncursesw.so.6) +if(EXISTS "/usr/lib/i386-linux-gnu/libncursesw.so.6") + target_link_libraries(viocalls /usr/lib/i386-linux-gnu/libncursesw.so.6) +else() + target_link_libraries(viocalls /usr/lib32/libncursesw.so.6) +endif() # !!! FIXME: clean this up/ if(LX_LEGACY)