summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindCurses.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index cd170c1..d64adfe 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -70,7 +70,11 @@ ELSE(NOT CURSES_USE_NCURSES)
FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h)
SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}")
- SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}" CACHE FILEPATH "path to curses")
+ SET(FORCE_ARG "");
+ IF("${CURSES_LIBRARY}" STREQUAL "CURSES_LIBRARY-NOTFOUND")
+ SET(FORCE_ARG "FORCE")
+ ENDIF("${CURSES_LIBRARY}" STREQUAL "CURSES_LIBRARY-NOTFOUND")
+ SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}" CACHE FILEPATH "path to curses" ${FORCE_ARG})
ENDIF(NOT CURSES_USE_NCURSES)