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.
Showing with 95 additions and 12 deletions