diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-12-03 21:13:17 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-12-03 21:13:17 (GMT) |
commit | c553c29e9fd6b2198ede5d77e7019166962aafae (patch) | |
tree | 3ba579330bf62f3272140f880a49dd3de4696d84 /Modules/FindCurses.cmake | |
parent | a50cdcb5a6a25cf6cc62403218e799e01c470c21 (diff) | |
download | CMake-c553c29e9fd6b2198ede5d77e7019166962aafae.zip CMake-c553c29e9fd6b2198ede5d77e7019166962aafae.tar.gz CMake-c553c29e9fd6b2198ede5d77e7019166962aafae.tar.bz2 |
ENH: fix curses on haiku
Diffstat (limited to 'Modules/FindCurses.cmake')
-rw-r--r-- | Modules/FindCurses.cmake | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake index 2a1df74..6e12379 100644 --- a/Modules/FindCurses.cmake +++ b/Modules/FindCurses.cmake @@ -15,7 +15,6 @@ FIND_LIBRARY(CURSES_CURSES_LIBRARY NAMES curses ) FIND_LIBRARY(CURSES_NCURSES_LIBRARY NAMES ncurses ) - SET(CURSES_USE_NCURSES FALSE) IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY) @@ -80,21 +79,32 @@ ELSE(NOT CURSES_USE_NCURSES) # for compatibility with older FindCurses.cmake this has to be in the cache # FORCE must not be used since this would break builds which preload + # however if the value of the variable has NOTFOUND in it, then + # it is OK to force, and we need to force in order to have it work. # a cache wqith these variables set # only put ncurses include and library into # variables if they are found + IF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H) + GET_FILENAME_COMPONENT(CURSES_NCURSES_INCLUDE_PATH + "${CURSES_HAVE_NCURSES_NCURSES_H}" PATH) + ENDIF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H) IF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY) - + SET( FORCE_IT ) + IF(CURSES_INCLUDE_PATH MATCHES NOTFOUND) + SET(FORCE_IT FORCE) + ENDIF(CURSES_INCLUDE_PATH MATCHES NOTFOUND) SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}" - CACHE FILEPATH "The curses include path") + CACHE FILEPATH "The curses include path" ${FORCE_IT}) + SET( FORCE_IT) + IF(CURSES_LIBRARY MATCHES NOTFOUND) + SET(FORCE_IT FORCE) + ENDIF(CURSES_LIBRARY MATCHES NOTFOUND) SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}" - CACHE FILEPATH "The curses library") + CACHE FILEPATH "The curses library" ${FORCE_IT}) ENDIF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY) ENDIF(NOT CURSES_USE_NCURSES) - - FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}") FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr ) |