Files
CMake/Source/Checks/Curses/CheckCurses.c
Brad King 99bf77f49c ccmake: Check for curses more robustly before enabling
Compute a default for `BUILD_CursesDialog` by building a small test
project that uses curses.  Disable `ccmake` by default if it fails,
and do not search for Curses as part of the main build.  This avoids
creating FindCurses cache entries when we are not considering ccmake.

If `BUILD_CursesDialog` is enabled (e.g. by the user) then warn if
curses cannot be found.
2018-03-21 13:57:45 -04:00

16 lines
283 B
C

#if defined(CURSES_HAVE_NCURSES_H)
#include <ncurses.h>
#elif defined(CURSES_HAVE_NCURSES_NCURSES_H)
#include <ncurses/ncurses.h>
#elif defined(CURSES_HAVE_NCURSES_CURSES_H)
#include <ncurses/curses.h>
#else
#include <curses.h>
#endif
int main()
{
curses_version();
return 0;
}