From 1c5898dd378afea6914dd257b52d05835f7c1339 Mon Sep 17 00:00:00 2001 From: Ihor Dutchak Date: Thu, 2 Nov 2023 15:30:02 +0200 Subject: [PATCH] Enforce embedded readline for MSVC/MinGW --- CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d105826e..e69844b11 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -219,14 +219,16 @@ endif() # ------------------------------------- # Find libreadline -find_library(HAVE_LIBREADLINE NAMES ${PREFERRED_LIBREADLINE}) -if(HAVE_LIBREADLINE) - set(LIB_LIBREADLINE ${HAVE_LIBREADLINE}) - find_library(LIB_NCURSES NAMES ncurses) -elseif(MSVC) - set(HAVE_LIBREADLINE 1) +if(MSVC) + set(HAVE_LIBREADLINE "Embedded MSVC") elseif(MINGW) - set(HAVE_LIBREADLINE 1) + set(HAVE_LIBREADLINE "Embedded MINGW") +else() + find_library(HAVE_LIBREADLINE NAMES ${PREFERRED_LIBREADLINE}) + if(HAVE_LIBREADLINE) + set(LIB_LIBREADLINE ${HAVE_LIBREADLINE}) + find_library(LIB_NCURSES NAMES ncurses) + endif() endif() #-------------------------------------