summaryrefslogtreecommitdiff
path: root/Modules/FindCurses.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-06-09 16:04:06 -0400
committerBrad King <brad.king@kitware.com>2008-06-09 16:04:06 -0400
commite2ec3b671b3753da42df167ba1a4e496d08b5ce2 (patch)
treefe2cea51ff2d1d1e681483a4bdad911fea88457c /Modules/FindCurses.cmake
parent05434489079708e9896d03b7fc9153ded1d960b4 (diff)
downloadcmake-e2ec3b671b3753da42df167ba1a4e496d08b5ce2.tar.gz
ENH: Cleanup Find* modules with new HINTS feature
- The find_* commands now provide a HINTS option. - The option specifies paths to be preferred over the system paths. - Many Find* modules were using two find calls with NO_DEFAULT_PATH to approximate the behavior, but that blocked users from overriding things with CMAKE_PREFIX_PATH. - This commit uses the HINTS feature to get desired behavior in only one find command call.
Diffstat (limited to 'Modules/FindCurses.cmake')
-rw-r--r--Modules/FindCurses.cmake10
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index c854ba8e54..6c8de0c1c7 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -66,12 +66,10 @@ ELSE(NOT CURSES_USE_NCURSES)
FIND_FILE(CURSES_HAVE_NCURSES_H ncurses.h)
FIND_FILE(CURSES_HAVE_NCURSES_NCURSES_H ncurses/ncurses.h)
FIND_FILE(CURSES_HAVE_NCURSES_CURSES_H ncurses/curses.h)
- FIND_FILE(CURSES_HAVE_CURSES_H curses.h PATHS "${_cursesParentDir}/include" NO_DEFAULT_PATH)
- FIND_FILE(CURSES_HAVE_CURSES_H curses.h)
+ FIND_FILE(CURSES_HAVE_CURSES_H curses.h HINTS "${_cursesParentDir}/include")
FIND_PATH(CURSES_NCURSES_INCLUDE_PATH ncurses.h ncurses/ncurses.h ncurses/curses.h)
- FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h PATHS "${_cursesParentDir}/include" NO_DEFAULT_PATH)
- FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h)
+ FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h HINTS "${_cursesParentDir}/include")
# 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 a cache wqith these variables set
@@ -81,10 +79,10 @@ ENDIF(NOT CURSES_USE_NCURSES)
-FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr PATHS "${_cursesLibDir}" NO_DEFAULT_PATH)
+FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}")
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr )
-FIND_LIBRARY(CURSES_FORM_LIBRARY form PATHS "${_cursesLibDir}" NO_DEFAULT_PATH)
+FIND_LIBRARY(CURSES_FORM_LIBRARY form HINTS "${_cursesLibDir}")
FIND_LIBRARY(CURSES_FORM_LIBRARY form )
# for compatibility with older FindCurses.cmake this has to be in the cache