[11167] Added CMake support

(based on cipherCOM's commit 0039476)

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
cipherCOM 2011-02-13 03:42:09 +03:00 committed by VladimirMangos
parent c9942fb0cc
commit a81cf28610
43 changed files with 3465 additions and 4 deletions

33
cmake/FindTermcap.cmake Normal file
View file

@ -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)