diff options
author | iDunk5400 <iDunk5400@users.noreply.github.com> | 2019-09-07 22:02:11 +0200 |
---|---|---|
committer | iDunk5400 <iDunk5400@users.noreply.github.com> | 2019-09-07 22:02:11 +0200 |
commit | ab2819a365f0953c418b46269aa78ed72ec7ac37 (patch) | |
tree | 29d52c3e49bd03ad37b8d2cdc1b6c768928d5b88 /CMakeLists.txt | |
parent | Merge pull request #5824 (diff) | |
download | monero-ab2819a365f0953c418b46269aa78ed72ec7ac37.tar.xz |
depends: attempt to fix readline
Make readline actually compile, and make ncurses use existing terminfo data (if available).
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 60fcf130e..60a44944f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -955,7 +955,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) @@ -965,6 +965,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) |