/[pcre]/code/trunk/cmake/FindReadline.cmake
ViewVC logotype

Contents of /code/trunk/cmake/FindReadline.cmake

Parent Directory Parent Directory | Revision Log Revision Log


Revision 344 - (show annotations) (download)
Tue Apr 22 09:16:15 2008 UTC (6 years, 8 months ago) by ph10
File size: 1287 byte(s)
CMake patches for readline support to ensure ncurses is linked when required.

1 # from http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/FindReadline.cmake
2 # http://websvn.kde.org/trunk/KDE/kdeedu/cmake/modules/COPYING-CMAKE-SCRIPTS
3 # --> BSD licensed
4 #
5 # GNU Readline library finder
6 if(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
7 set(READLINE_FOUND TRUE)
8 else(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)
9 FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h
10 /usr/include/readline
11 )
12
13 # 2008-04-22 The next clause used to read like this:
14 #
15 # FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
16 # FIND_LIBRARY(NCURSES_LIBRARY NAMES ncurses )
17 # include(FindPackageHandleStandardArgs)
18 # FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG NCURSES_LIBRARY READLINE_INCLUDE_DIR READLINE_LIBRARY )
19 #
20 # I was advised to modify it such that it will find an ncurses library if
21 # required, but not if one was explicitly given, that is, it allows the
22 # default to be overridden. PH
23
24 FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
25 include(FindPackageHandleStandardArgs)
26 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARY )
27
28 MARK_AS_ADVANCED(READLINE_INCLUDE_DIR READLINE_LIBRARY)
29 endif(READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NCURSES_LIBRARY)

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12