1*061da546Spatrick#.rst:
2*061da546Spatrick# FindCursesAndPanel
3*061da546Spatrick# -----------
4*061da546Spatrick#
5*061da546Spatrick# Find the curses and panel library as a whole.
6*061da546Spatrick
7*061da546Spatrickif(CURSES_INCLUDE_DIRS AND CURSES_LIBRARIES AND PANEL_LIBRARIES)
8*061da546Spatrick  set(CURSESANDPANEL_FOUND TRUE)
9*061da546Spatrickelse()
10*061da546Spatrick  find_package(Curses QUIET)
11*061da546Spatrick  find_library(PANEL_LIBRARIES NAMES panel DOC "The curses panel library" QUIET)
12*061da546Spatrick  include(FindPackageHandleStandardArgs)
13*061da546Spatrick  find_package_handle_standard_args(CursesAndPanel
14*061da546Spatrick                                    FOUND_VAR
15*061da546Spatrick                                      CURSESANDPANEL_FOUND
16*061da546Spatrick                                    REQUIRED_VARS
17*061da546Spatrick                                      CURSES_INCLUDE_DIRS
18*061da546Spatrick                                      CURSES_LIBRARIES
19*061da546Spatrick                                      PANEL_LIBRARIES)
20*061da546Spatrick  if(CURSES_FOUND AND PANEL_LIBRARIES)
21*061da546Spatrick    mark_as_advanced(CURSES_INCLUDE_DIRS CURSES_LIBRARIES PANEL_LIBRARIES)
22*061da546Spatrick  endif()
23*061da546Spatrickendif()
24*061da546Spatrick
25