2005-12-14 21:51:08 +03:00
|
|
|
# - Find the curses include file and library
|
2001-11-05 02:05:21 +03:00
|
|
|
#
|
|
|
|
|
2007-07-19 17:00:51 +04:00
|
|
|
FIND_PATH(CURSES_INCLUDE_PATH curses.h )
|
|
|
|
|
|
|
|
FIND_LIBRARY(CURSES_LIBRARY NAMES curses ncurses )
|
|
|
|
|
|
|
|
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr )
|
|
|
|
|
|
|
|
FIND_LIBRARY(FORM_LIBRARY form )
|
2001-11-05 21:24:44 +03:00
|
|
|
|
2005-09-08 19:38:55 +04:00
|
|
|
# Need to provide the *_LIBRARIES
|
|
|
|
SET(CURSES_LIBRARIES ${CURSES_LIBRARY})
|
|
|
|
|
|
|
|
IF(CURSES_EXTRA_LIBRARY)
|
|
|
|
SET(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_EXTRA_LIBRARY})
|
|
|
|
ENDIF(CURSES_EXTRA_LIBRARY)
|
|
|
|
|
|
|
|
IF(FORM_LIBRARY)
|
|
|
|
SET(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${FORM_LIBRARY})
|
|
|
|
ENDIF(FORM_LIBRARY)
|
|
|
|
|
|
|
|
# Proper name is *_INCLUDE_DIR
|
|
|
|
SET(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})
|
|
|
|
|
2007-07-19 17:00:51 +04:00
|
|
|
# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if
|
|
|
|
# all listed variables are TRUE
|
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
2007-07-23 17:49:52 +04:00
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses DEFAULT_MSG CURSES_LIBRARY CURSES_INCLUDE_PATH)
|
2007-07-19 17:00:51 +04:00
|
|
|
|
|
|
|
|
2005-09-08 19:38:55 +04:00
|
|
|
MARK_AS_ADVANCED(
|
|
|
|
CURSES_INCLUDE_PATH
|
|
|
|
CURSES_LIBRARY
|
|
|
|
CURSES_EXTRA_LIBRARY
|
|
|
|
FORM_LIBRARY
|
|
|
|
CURSES_LIBRARIES
|
|
|
|
CURSES_INCLUDE_DIR
|
|
|
|
)
|
|
|
|
|