[Cmake-commits] [cmake-commits] hoffman committed FindCurses.cmake 1.16 1.17
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Sep 18 15:23:02 EDT 2008
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv22291
Modified Files:
FindCurses.cmake
Log Message:
ENH: try to make this work if ncurses lib is found bug not the ncurses header
Index: FindCurses.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindCurses.cmake,v
retrieving revision 1.16
retrieving revision 1.17
diff -C 2 -d -r1.16 -r1.17
*** FindCurses.cmake 9 Jun 2008 20:04:05 -0000 1.16
--- FindCurses.cmake 18 Sep 2008 19:23:00 -0000 1.17
***************
*** 37,44 ****
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)
! CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}" wsyncup "" CURSES_NCURSES_HAS_WSYNCUP)
IF( CURSES_NCURSES_HAS_WSYNCUP)
SET(CURSES_USE_NCURSES TRUE)
--- 37,46 ----
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)
! CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}"
! wsyncup "" CURSES_NCURSES_HAS_WSYNCUP)
IF( CURSES_NCURSES_HAS_WSYNCUP)
SET(CURSES_USE_NCURSES TRUE)
***************
*** 57,62 ****
# 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
! SET(CURSES_INCLUDE_PATH "${CURSES_CURSES_H_PATH}" CACHE FILEPATH "The curses include path")
! SET(CURSES_LIBRARY "${CURSES_CURSES_LIBRARY}" CACHE FILEPATH "The curses library")
ELSE(NOT CURSES_USE_NCURSES)
# we need to find ncurses
--- 59,66 ----
# 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
! SET(CURSES_INCLUDE_PATH "${CURSES_CURSES_H_PATH}"
! CACHE FILEPATH "The curses include path")
! SET(CURSES_LIBRARY "${CURSES_CURSES_LIBRARY}"
! CACHE FILEPATH "The curses library")
ELSE(NOT CURSES_USE_NCURSES)
# we need to find ncurses
***************
*** 67,79 ****
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 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 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
! SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}" CACHE FILEPATH "The curses include path")
! SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}" CACHE FILEPATH "The curses library")
ENDIF(NOT CURSES_USE_NCURSES)
--- 71,95 ----
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
! 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
! 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
! # only put ncurses include and library into
! # variables if they are found
! IF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
!
! SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}"
! CACHE FILEPATH "The curses include path")
! SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}"
! CACHE FILEPATH "The curses library")
! ENDIF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
!
ENDIF(NOT CURSES_USE_NCURSES)
***************
*** 87,93 ****
# 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
! SET(FORM_LIBRARY "${CURSES_FORM_LIBRARY}" CACHE FILEPATH "The curses form library")
!
# Need to provide the *_LIBRARIES
--- 103,110 ----
# 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
! # qith these variables set
! SET(FORM_LIBRARY "${CURSES_FORM_LIBRARY}"
! CACHE FILEPATH "The curses form library")
# Need to provide the *_LIBRARIES
***************
*** 108,112 ****
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
! FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses DEFAULT_MSG CURSES_LIBRARY CURSES_INCLUDE_PATH)
MARK_AS_ADVANCED(
--- 125,130 ----
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
! FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses DEFAULT_MSG
! CURSES_LIBRARY CURSES_INCLUDE_PATH)
MARK_AS_ADVANCED(
More information about the Cmake-commits
mailing list