Skip to content

Instantly share code, notes, and snippets.

@ZenulAbidin
Last active August 30, 2021 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZenulAbidin/909bd7f5f0de84bbe4e6d7213ab32bd5 to your computer and use it in GitHub Desktop.
Save ZenulAbidin/909bd7f5f0de84bbe4e6d7213ab32bd5 to your computer and use it in GitHub Desktop.
Readline fixed
if(USE_READLINE)
find_package(Readline)
if(READLINE_FOUND AND GNU_READLINE_FOUND)
add_definitions(-DHAVE_READLINE)
include_directories(${Readline_INCLUDE_DIR})
message(STATUS "Found readline library at: ${Readline_ROOT_DIR}")
elseif (NOT READLINE_FOUND AND MINGW)
# Due to a problem in the package searching process for MinGW, some include paths
# are not found but library paths are.
if (BUILD_64)
set(Readline_ROOT_DIR /mingw64)
else()
set(Readline_ROOT_DIR /mingw32)
endif()
set(Readline_INCLUDE_DIR ${Readline_ROOT_DIR}/include)
message(WARNING "Readline was not found by automatic MinGW search so using default root directory: ${Readline_ROOT_DIR} and include directory ${Readline_INCLUDE_DIR}")
else()
message(STATUS "Could not find GNU readline library so building without readline support")
endif()
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment