CMake: Add ncurses library when readline is present

This commit is contained in:
Marius Greuel
2023-01-20 20:42:12 +01:00
parent c98a49bfcd
commit 61dccf4ad1
2 changed files with 2 additions and 0 deletions

View File

@@ -218,6 +218,7 @@ endif()
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)
endif()

View File

@@ -271,6 +271,7 @@ target_link_libraries(libavrdude
${LIB_LIBFTDI}
${LIB_LIBFTDI1}
${LIB_LIBREADLINE}
${LIB_NCURSES}
${EXTRA_WINDOWS_LIBRARIES}
)