Ncurses: if CMAKE_USE_SYSTEM_FORM form.h not found in subdirectory ncurses/
If CMAKE_USE_SYSTEM_FORM is set, Ncurses from the system is used. On some systems (like openSuse), all ncurses headers are in /usr/include/ncurses/ with additional symbolic links in /usr/include. FindNcurses.cmake finds the symbolic link, but later the include of form.h fails.
Without CMAKE_USE_SYSTEM_FORM, the accordingly patched form.h provided by CMake is used, so the problem does not occur.
/* figure out which curses.h to include */
# 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
# if defined(__hpux)
# if defined(_XOPEN_SOURCE_EXTENDED)
# define HAVE__XOPEN_SOURCE_EXTENDED
# else
# define _XOPEN_SOURCE_EXTENDED
# endif
# endif
# include <curses.h>
# if defined(__hpux) && !defined(HAVE__XOPEN_SOURCE_EXTENDED)
# undef _XOPEN_SOURCE_EXTENDED
# endif
# endif