[cmake-developers] ncurses sub-dir and include path
Brad King
brad.king at kitware.com
Mon Jul 29 13:57:12 EDT 2019
On 7/28/19 4:21 PM, Christoph Grüninger wrote:
> -include_directories(${CURSES_INCLUDE_PATH})
> +include_directories(${CURSES_INCLUDE_PATH}/ncurses/)
Why is that needed given the conditions here:
https://gitlab.kitware.com/cmake/cmake/blob/v3.15.1/Source/CursesDialog/form/form.h#L38-57
https://gitlab.kitware.com/cmake/cmake/blob/v3.15.1/Source/Checks/Curses/CheckCurses.c#L1-9
?
> The reason is, that curses.h and ncurses.h are present in /usr/include.
> Both are symbolic links to /usr/include/ncurses/curses.h.
What actually goes wrong?
That said, it's bad that the mess of conditions in the code I linked above
is even needed to use FindCurses. It would be nice to add a policy to
change the FindCurses module to work in a more sane way. However, we must
first determine what the proper behavior should be. Should consumers
put the `ncurses/` part of the path in their `#include` lines or not?
If they do, how do they build against plain curses?
Thanks,
-Brad
More information about the cmake-developers
mailing list