Explorar o código

BUG: fix for 6918 ncurses should work without curses

Bill Hoffman %!s(int64=17) %!d(string=hai) anos
pai
achega
e29ca248a3
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      Modules/FindCurses.cmake

+ 5 - 1
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)