Report curses detection in CMake configure

This commit is contained in:
AI Patch Builder
2026-06-05 15:16:51 +00:00
committed by Mario Fetka
parent cc1bac9efd
commit a7f3d87443

View File

@@ -45,6 +45,31 @@ find_package(Threads REQUIRED)
find_library(NWFLAIM_RT_LIBRARY rt)
find_library(NWFLAIM_DL_LIBRARY dl)
find_package(Curses QUIET)
if(CURSES_FOUND)
set(_nwflaim_curses_include_dirs "")
if(CURSES_INCLUDE_DIRS)
set(_nwflaim_curses_include_dirs "${CURSES_INCLUDE_DIRS}")
elseif(CURSES_INCLUDE_DIR)
set(_nwflaim_curses_include_dirs "${CURSES_INCLUDE_DIR}")
endif()
message(STATUS "NWFLAIM: curses/ncurses found")
if(_nwflaim_curses_include_dirs)
message(STATUS "NWFLAIM: curses include dirs: ${_nwflaim_curses_include_dirs}")
else()
message(STATUS "NWFLAIM: curses include dirs: <none reported>")
endif()
if(CURSES_LIBRARIES)
message(STATUS "NWFLAIM: curses libraries: ${CURSES_LIBRARIES}")
else()
message(STATUS "NWFLAIM: curses libraries: <none reported>")
endif()
if(NWFLAIM_BUILD_TOOLS)
message(STATUS "NWFLAIM: tools enabled; curses-backed tools will be built")
endif()
else()
message(STATUS "NWFLAIM: curses/ncurses not found")
endif()
if(NWFLAIM_BUILD_TOOLS AND NOT CURSES_FOUND)
message(FATAL_ERROR "NWFLAIM_BUILD_TOOLS requires curses/ncurses")
endif()