diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a9d6be986..a8060f90c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -655,6 +655,19 @@ endif() list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS}) +option(USE_READLINE "Build with GNU readline support." ON) +if(USE_READLINE) + find_package(Readline) + if(READLINE_FOUND AND GNU_READLINE_FOUND) + add_definitions(-DHAVE_READLINE) + include_directories(${Readline_INCLUDE_DIR}) + list(APPEND EXTRA_LIBRARIES ${Readline_LIBRARY}) + message(STATUS "Found readline library at: ${Readline_ROOT_DIR}") + else() + message(STATUS "Could not find GNU readline library so building without readline support") + endif() +endif() + if(ANDROID) set(ATOMIC libatomic.a) endif() |