aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-09-24 10:34:59 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-09-24 10:34:59 -0500
commitcbec75ec314105a53d4962eb5b3adb28545aae17 (patch)
treefb7a769ae49a0126ba8612a448fc431816b03d4e /CMakeLists.txt
parentMerge pull request #5891 (diff)
parentdepends: attempt to fix readline (diff)
downloadmonero-cbec75ec314105a53d4962eb5b3adb28545aae17.tar.xz
Merge pull request #5892
ab2819a depends: attempt to fix readline (iDunk5400)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f628049b..0d8ea088b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -909,7 +909,7 @@ if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
endif()
option(USE_READLINE "Build with GNU readline support." ON)
-if(USE_READLINE)
+if(USE_READLINE AND NOT DEPENDS)
find_package(Readline)
if(READLINE_FOUND AND GNU_READLINE_FOUND)
add_definitions(-DHAVE_READLINE)
@@ -919,6 +919,14 @@ if(USE_READLINE)
else()
message(STATUS "Could not find GNU readline library so building without readline support")
endif()
+elseif(USE_READLINE AND DEPENDS AND NOT MINGW)
+ find_path(Readline_INCLUDE_PATH readline/readline.h)
+ find_library(Readline_LIBRARY readline)
+ find_library(Terminfo_LIBRARY tinfo)
+ set(Readline_LIBRARY "${Readline_LIBRARY};${Terminfo_LIBRARY}")
+ set(GNU_READLINE_LIBRARY ${Readline_LIBRARY})
+ add_definitions(-DHAVE_READLINE)
+ set(EPEE_READLINE epee_readline)
endif()
if(ANDROID)