ENH: fix curses on haiku

This commit is contained in:
Bill Hoffman 2008-12-03 16:13:17 -05:00
parent a50cdcb5a6
commit c553c29e9f
2 changed files with 22 additions and 6 deletions

View File

@ -15,7 +15,6 @@
FIND_LIBRARY(CURSES_CURSES_LIBRARY NAMES curses )
FIND_LIBRARY(CURSES_NCURSES_LIBRARY NAMES ncurses )
SET(CURSES_USE_NCURSES FALSE)
IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY)
@ -80,21 +79,32 @@ ELSE(NOT CURSES_USE_NCURSES)
# 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
# however if the value of the variable has NOTFOUND in it, then
# it is OK to force, and we need to force in order to have it work.
# a cache wqith these variables set
# only put ncurses include and library into
# variables if they are found
IF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
GET_FILENAME_COMPONENT(CURSES_NCURSES_INCLUDE_PATH
"${CURSES_HAVE_NCURSES_NCURSES_H}" PATH)
ENDIF(NOT CURSES_NCURSES_INCLUDE_PATH AND CURSES_HAVE_NCURSES_NCURSES_H)
IF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
SET( FORCE_IT )
IF(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
SET(FORCE_IT FORCE)
ENDIF(CURSES_INCLUDE_PATH MATCHES NOTFOUND)
SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}"
CACHE FILEPATH "The curses include path")
CACHE FILEPATH "The curses include path" ${FORCE_IT})
SET( FORCE_IT)
IF(CURSES_LIBRARY MATCHES NOTFOUND)
SET(FORCE_IT FORCE)
ENDIF(CURSES_LIBRARY MATCHES NOTFOUND)
SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}"
CACHE FILEPATH "The curses library")
CACHE FILEPATH "The curses library" ${FORCE_IT})
ENDIF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
ENDIF(NOT CURSES_USE_NCURSES)
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}")
FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr )

View File

@ -12,3 +12,9 @@ SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,")
INCLUDE(Platform/UnixPaths)
LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /boot/common)
LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH /boot/common/include)
LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH /boot/common/lib)
LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH /boot/common/bin)
LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES /boot/common/lib)