[cmake-developers] ncurses sub-dir and include path
Christoph Grüninger
foss at grueninger.de
Tue Jul 30 16:57:29 EDT 2019
Hi Brad,
thank you for pointing out the conditions. But they cannot be used to
ignore the symolic link in /usr/include/ to favor the acutal header in
/usr/include/ncurses/. I always end up with /usr/include/ being the
CURSES_INCLUDE_PATH.
> 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?
I always end up with /usr/include/ being the CURSES_INCLUDE_PATH.
> 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?
Yes, this would be nice. Currently, I cannot answer your question, as I
am alien to Curses / Ncurses.
Kind regards,
Christoph
--
Nous vivons une époque où les pizzas arrivent plus vite que la police.
[Claude Chabrol]
More information about the cmake-developers
mailing list