aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindReadline.cmake
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-26 11:46:25 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-10-26 11:47:15 +0000
commitdff0adfee5e658ae9442fd8b723b76e963a5cf45 (patch)
tree1ba6505e944e8a6de522fef29f048f0a8e12b6e5 /cmake/FindReadline.cmake
parentMerge pull request #4697 (diff)
downloadmonero-dff0adfee5e658ae9442fd8b723b76e963a5cf45.tar.xz
cmake: fix readline detection when the readline library is not found
Diffstat (limited to '')
-rw-r--r--cmake/FindReadline.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake
index de9ddc46d..f26911b26 100644
--- a/cmake/FindReadline.cmake
+++ b/cmake/FindReadline.cmake
@@ -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})