Skip to content

Commit

Permalink
Enforce embedded readline for MSVC/MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
Youw committed Nov 2, 2023
1 parent 6ec6a7b commit 1c5898d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

#-------------------------------------
Expand Down

0 comments on commit 1c5898d

Please sign in to comment.