Merge pull request #4730

dff0adfe cmake: fix readline detection when the readline library is not found (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-11-06 21:29:52 +02:00
commit ab6b2a5cdb
No known key found for this signature in database
GPG Key ID: 55432DF31CCD4FCD

View File

@ -66,7 +66,9 @@ check_function_exists(rl_copy_text HAVE_COPY_TEXT)
check_function_exists(rl_filename_completion_function HAVE_COMPLETION_FUNCTION)
if(NOT HAVE_COMPLETION_FUNCTION)
set(CMAKE_REQUIRED_LIBRARIES ${Readline_LIBRARY} ${Termcap_LIBRARY})
if (Readline_LIBRARY)
set(CMAKE_REQUIRED_LIBRARIES ${Readline_LIBRARY} ${Termcap_LIBRARY})
endif(Readline_LIBRARY)
check_function_exists(rl_copy_text HAVE_COPY_TEXT_TC)
check_function_exists(rl_filename_completion_function HAVE_COMPLETION_FUNCTION_TC)
set(HAVE_COMPLETION_FUNCTION ${HAVE_COMPLETION_FUNCTION_TC})