diff options
Diffstat (limited to 'CMakeLists.txt')
-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) |