2017-10-12 12:08:32 +01:00
## after we have all functionality in
#
# ADD_SUBDIRECTORY(console/terminal)
option ( WITH_READLINE "GNU readline console" ON )
2017-10-17 00:13:09 +01:00
2017-10-12 12:08:32 +01:00
if ( WITH_READLINE )
2017-11-10 23:08:35 +00:00
find_library ( READLINE_tinfo_LIBRARY
N A M E S t i n f o
message ( STATUS "tinfo DLL found at ${READLINE_tinfo_LIBRARY}" )
2018-02-10 14:12:29 +00:00
H I N T S $ { R E A D L I N E _ R O O T _ D I R } / l i b
2017-11-10 23:08:35 +00:00
)
find_library ( READLINE_tinfow_LIBRARY
N A M E S t i n f o w
2018-02-10 14:12:29 +00:00
H I N T S $ { R E A D L I N E _ R O O T _ D I R } / l i b
2017-11-10 23:08:35 +00:00
)
find_library ( READLINE_ncurses_LIBRARY
essage ( STATUS "tinfo DLL found at ${READLINE_tinfo_LIBRARY}" )
2018-02-10 14:12:29 +00:00
H I N T S $ { R E A D L I N E _ R O O T _ D I R } / l i b
2017-11-10 23:08:35 +00:00
)
find_library ( READLINE_tinfow_LIBRARY
N A M E S t i n f o w
2018-02-10 14:12:29 +00:00
H I N T S $ { R E A D L I N E _ R O O T _ D I R } / l i b
2017-11-10 23:08:35 +00:00
)
2017-10-17 00:13:09 +01:00
find_library ( READLINE_ncurses_LIBRARY
N A M E S n c u r s e s
2018-02-10 14:12:29 +00:00
H I N T S $ { R E A D L I N E _ R O O T _ D I R } / l i b
2017-11-10 23:08:35 +00:00
message ( STATUS "readline ncurses DLL found at ${READLINE_ncurses_LIBRARY}" )
2017-10-17 00:13:09 +01:00
)
2017-11-10 23:08:35 +00:00
find_library ( READLINE_ncursesw_LIBRARY
N A M E S n c u r s e s w
message ( STATUS "readline ncursesw DLL found at ${READLINE_ncursesw_LIBRARY}" )
2018-02-10 14:12:29 +00:00
H I N T S $ { R E A D L I N E _ R O O T _ D I R } / l i b
2017-11-10 23:08:35 +00:00
)
2017-10-17 00:13:09 +01:00
find_path ( READLINE_INCLUDE_DIR
N A M E S r e a d l i n e / r e a d l i n e . h
2018-02-10 14:12:29 +00:00
H I N T S $ { R E A D L I N E _ R O O T _ D I R } / i n c l u d e
2017-10-17 00:13:09 +01:00
)
find_library ( READLINE_readline_LIBRARY
N A M E S r e a d l i n e
2018-02-10 14:12:29 +00:00
H I N T S $ { R E A D L I N E _ I N C L U D E _ D I R / . . / l i b } $ { R E A D L I N E _ R O O T _ D I R } / l i b
2017-10-17 00:13:09 +01:00
if ( READLINE_readline_LIBRARY )
set ( HAVE_LIBREADLINE TRUE )
if ( READLINE_INCLUDE_DIR )
set ( READLINE_FOUND TRUE CACHE BOOL "readline is installed correctly" )
2017-11-10 23:08:35 +00:00
set ( READLINE_LIBRARIES ${ READLINE_ncursesw_LIBRARY } ${ READLINE_tinfow_LIBRARY } $ ${ READLINE_tinfo_LIBRARY } $ ${ READLINE_ncurses_LIBRARY } ${ READLINE_readline_LIBRARY } )
2017-10-17 00:13:09 +01:00
endif ( )
2017-11-10 23:08:35 +00:00
message ( STATUS "headers found so far at ${READLINE_INCLUDE_DIR}" )
message ( STATUS "libraries found so far at ${READLINE_readline_LIBRARY} ${READLINE_ncurses_LIBRARY} ${READLINE_tinfo_LIBRARY} ${READLINE_tinfow_LIBRARY} ${READLINE_ncursesw_LIBRARY} " )
e l s e
2017-10-17 00:13:09 +01:00
endif ( )
set ( YAP_SYSTEM_OPTIONS "readline" ${ YAP_SYSTEM_OPTIONS } )
set ( EXTRALIBS ${ EXTRALIBS } readline )
endif ( )