OpenBSD 6.9 ncursesw header detection with FIND_PACKAGE(Curses)
On OpenBSD 6.9 with CMake installed via pkg_add (pkg_info -Q reports that cmake-3.19.4p0v0 is installed), running FIND_PACKAGE(Curses) in CMake with wide character support required fails with the message: "Could NOT find Curses (missing: CURSES_INCLUDE_PATH)".
From what I see, the cause is that OpenBSD's packaging of ncurses uses ncurses.h for both the wide and standard character versions and does not have ncursesw/ncurses.h or ncursesw.h installed. There is only /usr/include/ncurses.h and /usr/include/curses.h.
Steps to reproduce:
- Save the attached CMakeLists.txt as /var/tmp/CMakeLists.txt .
- Run the following from an interactive shell:
cd /var/tmp && mkdir build && cd build
cmake --debug-find ..
- On the OpenBSD 6.9 system I have access to, that generated the output in the attached cmake_output.txt .