IF(NCURSES_FOUND)
  SET(NCURSES_FIND_QUIETLY TRUE)
ENDIF(NCURSES_FOUND)

FIND_PATH(NCURSES_INCLUDE_PATH
  NAMES ncurses.h curses.h
  PATH_SUFFIXES ncurses
  PATHS /usr/include /usr/local/include /usr/pkg/include
)

FIND_LIBRARY(NCURSES_LIBRARY
  NAMES ncurses ncursesw
  PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)

IF (NCURSES_INCLUDE_PATH AND NCURSES_LIBRARY)
  SET(NCURSES_FOUND TRUE)
ENDIF(NCURSES_INCLUDE_PATH AND NCURSES_LIBRARY)

MARK_AS_ADVANCED(
  NCURSES_INCLUDE_PATH
  NCURSES_LIBRARY
)
