mirror of
https://github.com/Dushistov/sdcv.git
synced 2025-12-16 01:41:55 +00:00
fix build without readline
This commit is contained in:
@@ -27,11 +27,15 @@ if (NOT GLIB2_FOUND)
|
|||||||
"make sure that you install it")
|
"make sure that you install it")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(WITH_READLINE True CACHE BOOL "Use readline library")
|
||||||
|
|
||||||
|
if (WITH_READLINE)
|
||||||
find_path(READLINE_INCLUDE_DIR readline/readline.h)
|
find_path(READLINE_INCLUDE_DIR readline/readline.h)
|
||||||
find_library(READLINE_LIBRARY NAMES readline)
|
find_library(READLINE_LIBRARY NAMES readline)
|
||||||
if (READLINE_INCLUDE_DIR AND READLINE_LIBRARY)
|
if (NOT (READLINE_INCLUDE_DIR AND READLINE_LIBRARY))
|
||||||
set(WITH_READLINE True)
|
set(WITH_READLINE False CACHE FORCE)
|
||||||
endif ()
|
endif ()
|
||||||
|
endif (WITH_READLINE)
|
||||||
|
|
||||||
option(ENABLE_NLS "Enable NLS support" True)
|
option(ENABLE_NLS "Enable NLS support" True)
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ namespace {
|
|||||||
|
|
||||||
class dummy_readline : public IReadLine {
|
class dummy_readline : public IReadLine {
|
||||||
public:
|
public:
|
||||||
bool read(const string& banner, string& line) override {
|
bool read(const std::string &banner, std::string &line) override {
|
||||||
printf("%s", banner.c_str());
|
printf("%s", banner.c_str());
|
||||||
return stdio_getline(stdin, line);
|
return stdio_getline(stdin, line);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user