summaryrefslogtreecommitdiffstats
path: root/Modules/FindCurses.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-19 13:00:51 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-19 13:00:51 (GMT)
commitc7770b8edbff442267563bd3036cef8fdb0cc4a9 (patch)
tree1c73f377e04981e72043a9ac5fff8fef0eca343b /Modules/FindCurses.cmake
parentb6b1ebe2950e2437fffd4eecbe3f1992fc63e812 (diff)
downloadCMake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.zip
CMake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.tar.gz
CMake-c7770b8edbff442267563bd3036cef8fdb0cc4a9.tar.bz2
ENH: use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS() macro in most of the
not-too-complicated modules -remove unnecessary default search paths used in the FIND_XXX() calls Alex
Diffstat (limited to 'Modules/FindCurses.cmake')
-rw-r--r--Modules/FindCurses.cmake42
1 files changed, 13 insertions, 29 deletions
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index 9c72c49..b8bd3b1 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -1,35 +1,13 @@
# - Find the curses include file and library
#
-FIND_PATH(CURSES_INCLUDE_PATH
- curses.h
- /usr/local/include
- /usr/include
-)
-
-FIND_LIBRARY(CURSES_LIBRARY
- NAMES curses ncurses
- PATHS
- /usr/local/lib
- /usr/lib
- /lib
-)
-
-FIND_LIBRARY(CURSES_EXTRA_LIBRARY
- cur_colr
- PATHS
- /usr/local/lib
- /usr/lib
- /lib
-)
-
-FIND_LIBRARY(FORM_LIBRARY
- form
- PATHS
- /usr/local/lib
- /usr/lib
- /lib
-)
+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 )
# Need to provide the *_LIBRARIES
SET(CURSES_LIBRARIES ${CURSES_LIBRARY})
@@ -45,6 +23,12 @@ ENDIF(FORM_LIBRARY)
# Proper name is *_INCLUDE_DIR
SET(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH})
+# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses CURSES_LIBRARY CURSES_INCLUDE_PATH)
+
+
MARK_AS_ADVANCED(
CURSES_INCLUDE_PATH
CURSES_LIBRARY