CMake: If installed, use static version of libreadline for MSYS2
This commit is contained in:
parent
053c2dcdd3
commit
0ea4b08b2f
|
@ -118,6 +118,7 @@ if(WIN32)
|
||||||
set(PREFERRED_LIBHIDAPI libhidapi.a libhidapi-libusb.a libhidapi-hidraw.a hidapi hidapi-libusb hidapi-hidraw)
|
set(PREFERRED_LIBHIDAPI libhidapi.a libhidapi-libusb.a libhidapi-hidraw.a hidapi hidapi-libusb hidapi-hidraw)
|
||||||
set(PREFERRED_LIBFTDI libftdi.a ftdi)
|
set(PREFERRED_LIBFTDI libftdi.a ftdi)
|
||||||
set(PREFERRED_LIBFTDI1 libftdi1.a ftdi1)
|
set(PREFERRED_LIBFTDI1 libftdi1.a ftdi1)
|
||||||
|
set(PREFERRED_LIBREADLINE libreadline.a)
|
||||||
else()
|
else()
|
||||||
set(PREFERRED_LIBELF elf)
|
set(PREFERRED_LIBELF elf)
|
||||||
set(PREFERRED_LIBUSB usb)
|
set(PREFERRED_LIBUSB usb)
|
||||||
|
@ -125,6 +126,7 @@ else()
|
||||||
set(PREFERRED_LIBHIDAPI hidapi hidapi-libusb hidapi-hidraw)
|
set(PREFERRED_LIBHIDAPI hidapi hidapi-libusb hidapi-hidraw)
|
||||||
set(PREFERRED_LIBFTDI ftdi)
|
set(PREFERRED_LIBFTDI ftdi)
|
||||||
set(PREFERRED_LIBFTDI1 ftdi1)
|
set(PREFERRED_LIBFTDI1 ftdi1)
|
||||||
|
set(PREFERRED_LIBREADLINE readline)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
|
@ -212,7 +214,7 @@ endif()
|
||||||
# -------------------------------------
|
# -------------------------------------
|
||||||
# Find libreadline
|
# Find libreadline
|
||||||
|
|
||||||
find_library(HAVE_LIBREADLINE NAMES readline)
|
find_library(HAVE_LIBREADLINE NAMES ${PREFERRED_LIBREADLINE})
|
||||||
if(HAVE_LIBREADLINE)
|
if(HAVE_LIBREADLINE)
|
||||||
set(LIB_LIBREADLINE ${HAVE_LIBREADLINE})
|
set(LIB_LIBREADLINE ${HAVE_LIBREADLINE})
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue