From e31be88ce06d8011f34b314c2e30618db33045de Mon Sep 17 00:00:00 2001 From: Marius Greuel Date: Fri, 18 Feb 2022 19:52:53 +0100 Subject: [PATCH] Add LIB_LIBHID to CMake project to fix MinGW build issue --- CMakeLists.txt | 3 +++ src/CMakeLists.txt | 1 + 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bfd4ab24..e3d6f8dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,6 +182,9 @@ endif() # Find libhidapi find_library(HAVE_LIBHID NAMES hid) +if(HAVE_LIBHID) + set(LIB_LIBHID ${HAVE_LIBHID}) +endif() find_library(HAVE_LIBHIDAPI NAMES ${PREFERRED_LIBHIDAPI}) if(HAVE_LIBHIDAPI) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2c8ee2f1..a8e0262b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -239,6 +239,7 @@ target_link_libraries(libavrdude ${LIB_LIBELF} ${LIB_LIBUSB} ${LIB_LIBUSB_1_0} + ${LIB_LIBHID} ${LIB_LIBHIDAPI} ${LIB_LIBFTDI} ${LIB_LIBFTDI1}