summaryrefslogtreecommitdiffstats
path: root/FindEditline.cmake
blob: 21c8208d0b21f2258a20e40d94c8b75df2692f8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FIND_PATH(EDITLINE_INCLUDE_DIR editline/readline.h)
FIND_LIBRARY(EDITLINE_LIBRARY NAMES edit) 

IF (EDITLINE_INCLUDE_DIR AND EDITLINE_LIBRARY)
   SET(EDITLINE_FOUND TRUE)
ENDIF (EDITLINE_INCLUDE_DIR AND EDITLINE_LIBRARY)

IF (EDITLINE_FOUND)
   IF (NOT Editline_FIND_QUIETLY)
      MESSAGE(STATUS "Found BSD editline: ${EDITLINE_LIBRARY}")
   ENDIF (NOT Editline_FIND_QUIETLY)
ELSE (EDITLINE_FOUND)
   IF (Editline_FIND_REQUIRED)
      MESSAGE(FATAL_ERROR "Could not find BSD editline")
   ENDIF (Editline_FIND_REQUIRED)
ENDIF (EDITLINE_FOUND)