[Cmake-commits] [cmake-commits] hoffman committed FindCurses.cmake 1.10 1.11
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Mar 28 10:08:29 EDT 2008
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv18937
Modified Files:
FindCurses.cmake
Log Message:
ENH: make this backwards compatible with older FindCurses
Index: FindCurses.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindCurses.cmake,v
retrieving revision 1.10
retrieving revision 1.11
diff -C 2 -d -r1.10 -r1.11
*** FindCurses.cmake 27 Aug 2007 13:01:14 -0000 1.10
--- FindCurses.cmake 28 Mar 2008 14:08:27 -0000 1.11
***************
*** 8,16 ****
# CURSES_HAVE_NCURSES_NCURSES_H - true if ncurses/ncurses.h is available
# CURSES_HAVE_NCURSES_CURSES_H - true if ncurses/curses.h is available
#
# Set CURSES_NEED_NCURSES to TRUE before the FIND_PACKAGE() command if NCurses
# functionality is required.
! FIND_LIBRARY(CURSES_CURSES_LIBRARY NAMES curses )
FIND_LIBRARY(CURSES_NCURSES_LIBRARY NAMES ncurses )
--- 8,17 ----
# CURSES_HAVE_NCURSES_NCURSES_H - true if ncurses/ncurses.h is available
# CURSES_HAVE_NCURSES_CURSES_H - true if ncurses/curses.h is available
+ # CURSES_LIBRARY - set for backwards compatibility with 2.4 CMake
#
# Set CURSES_NEED_NCURSES to TRUE before the FIND_PACKAGE() command if NCurses
# functionality is required.
! FIND_LIBRARY(CURSES_LIBRARY NAMES curses )
FIND_LIBRARY(CURSES_NCURSES_LIBRARY NAMES ncurses )
***************
*** 18,24 ****
SET(CURSES_USE_NCURSES FALSE)
! IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
SET(CURSES_USE_NCURSES TRUE)
! ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
--- 19,25 ----
SET(CURSES_USE_NCURSES FALSE)
! IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_LIBRARY)
SET(CURSES_USE_NCURSES TRUE)
! ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_LIBRARY)
***************
*** 34,40 ****
# prefix as the library was found, if still not found, try curses.h with the
# default search paths.
! IF(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
INCLUDE(CheckLibraryExists)
! CHECK_LIBRARY_EXISTS("${CURSES_CURSES_LIBRARY}" wsyncup "" CURSES_CURSES_HAS_WSYNCUP)
IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP)
--- 35,41 ----
# prefix as the library was found, if still not found, try curses.h with the
# default search paths.
! IF(CURSES_LIBRARY AND CURSES_NEED_NCURSES)
INCLUDE(CheckLibraryExists)
! CHECK_LIBRARY_EXISTS("${CURSES_LIBRARY}" wsyncup "" CURSES_CURSES_HAS_WSYNCUP)
IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP)
***************
*** 45,49 ****
ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP)
! ENDIF(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
--- 46,50 ----
ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP)
! ENDIF(CURSES_LIBRARY AND CURSES_NEED_NCURSES)
***************
*** 53,58 ****
SET(CURSES_INCLUDE_PATH "${CURSES_CURSES_H_PATH}")
! SET(CURSES_LIBRARY "${CURSES_CURSES_LIBRARY}")
! GET_FILENAME_COMPONENT(_cursesLibDir "${CURSES_CURSES_LIBRARY}" PATH)
GET_FILENAME_COMPONENT(_cursesParentDir "${_cursesLibDir}" PATH)
ELSE(NOT CURSES_USE_NCURSES)
--- 54,58 ----
SET(CURSES_INCLUDE_PATH "${CURSES_CURSES_H_PATH}")
! GET_FILENAME_COMPONENT(_cursesLibDir "${CURSES_LIBRARY}" PATH)
GET_FILENAME_COMPONENT(_cursesParentDir "${_cursesLibDir}" PATH)
ELSE(NOT CURSES_USE_NCURSES)
***************
*** 72,76 ****
SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}")
! SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}")
ENDIF(NOT CURSES_USE_NCURSES)
--- 72,76 ----
SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}")
! SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}" CACHE FILEPATH "path to curses")
ENDIF(NOT CURSES_USE_NCURSES)
***************
*** 108,112 ****
CURSES_LIBRARY
CURSES_CURSES_INCLUDE_PATH
! CURSES_CURSES_LIBRARY
CURSES_NCURSES_INCLUDE_PATH
CURSES_NCURSES_LIBRARY
--- 108,112 ----
CURSES_LIBRARY
CURSES_CURSES_INCLUDE_PATH
! CURSES_LIBRARY
CURSES_NCURSES_INCLUDE_PATH
CURSES_NCURSES_LIBRARY
More information about the Cmake-commits
mailing list