mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-24 07:28:54 -06:00
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.
16 lines
283 B
C
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;
|
|
}
|