diff options
| author | Kudlaty <none@none> | 2009-09-06 00:39:13 +0200 |
|---|---|---|
| committer | Kudlaty <none@none> | 2009-09-06 00:39:13 +0200 |
| commit | b6e694ab68de91c0ce03e98a35eafe29cb9e8b99 (patch) | |
| tree | 6460eabca6fad2e6b9a506a7d0a9cd3923400aff /cmake/FindTermcap.cmake | |
| parent | 5e13c487fd8821035bbd1505e08718e6d82fd931 (diff) | |
Add macro for finding Termcap with cmake, and some cleaning about readline
--HG--
branch : trunk
Diffstat (limited to 'cmake/FindTermcap.cmake')
| -rw-r--r-- | cmake/FindTermcap.cmake | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/cmake/FindTermcap.cmake b/cmake/FindTermcap.cmake new file mode 100644 index 00000000000..b3780d3ed8d --- /dev/null +++ b/cmake/FindTermcap.cmake @@ -0,0 +1,33 @@ +# find Terrmcap (terminal input library) includes and library +# +# TERMCAP_INCLUDE_DIR - where the directory containing the TERMCAP headers can be found +# TERMCAP_LIBRARY - full path to the TERMCAP library +# TERMCAP_FOUND - TRUE if TERMCAP was found + +MACRO(FIND_TERMCAP) + +FIND_PATH(TERMCAP_INCLUDE_DIR termcap.h + /usr/include + /usr/local/include + + /opt/local/include +) + +FIND_LIBRARY(TERMCAP_LIBRARY NAMES termcap PATH + /usr/lib + /usr/local/lib + /opt/local/lib + /usr/lib64 +) + +IF (TERMCAP_INCLUDE_DIR AND TERMCAP_LIBRARY) + SET(TERMCAP_FOUND TRUE) + MESSAGE(STATUS "Found GNU termcap: ${TERMCAP_LIBRARY}") + MESSAGE(STATUS "Include dir is: ${TERMCAP_INCLUDE_DIR}") + INCLUDE_DIRECTORIES(${TERMCAP_INCLUDE_DIR}) +ELSE (TERMCAP_INCLUDE_DIR AND TERMCAP_LIBRARY) + SET(TERMCAP_FOUND FALSE) + MESSAGE(FATAL_ERROR "Could not find GNU termcap") +ENDIF (TERMCAP_INCLUDE_DIR AND TERMCAP_LIBRARY) + +ENDMACRO(FIND_TERMCAP) |
