@MCUdude noted that the MinGW builds broke recently. Apparently, MinGW started shipping libhid.a (the Window SDK hid.lib equivalent), which enabled the HAVE_LIBHID detection. Another theory is, that libhid.a was present, but CMake did not find it previously.
Whatever the cause, this enabled and broke the PicKit2 programmer, which requires libhid on Windows (as opposed to libhidapi).
For the short-term, we need to adapt the CMake project to include libhid in the list of libraries for the linker.
Long-term, it would probably wise to remove support for libhid altogether and use libhidapi instead. libhidapi is using the libhid internally, and since libhidapi is readily available for all Windows platforms, we do not need the Windows HID library as a fallback.
ser_avrdoper.c is already setup for libhidapi, but pickit2.c relies on libhid on Windows.
Interestingly, CMake seems to have sometimes trouble finding libhid.a. For the MSVC builds, hid.lib is part of the Windows SDK, yet it shows HAVE_LIBHID: HAVE_LIBHID-NOTFOUND in the CI builds. On my machine at home, it says HAVE_LIBHID: C:/Program Files (x86)/Windows Kits/10/Lib/10.0.22000.0/um/x64/hid.lib, as one would expect.
@MCUdude noted that the MinGW builds broke recently. Apparently, MinGW started shipping libhid.a (the Window SDK hid.lib equivalent), which enabled the HAVE_LIBHID detection. Another theory is, that libhid.a was present, but CMake did not find it previously.
Whatever the cause, this enabled and broke the PicKit2 programmer, which requires libhid on Windows (as opposed to libhidapi).
For the short-term, we need to adapt the CMake project to include libhid in the list of libraries for the linker.
Long-term, it would probably wise to remove support for libhid altogether and use libhidapi instead. libhidapi is using the libhid internally, and since libhidapi is readily available for all Windows platforms, we do not need the Windows HID library as a fallback.
ser_avrdoper.c is already setup for libhidapi, but pickit2.c relies on libhid on Windows.
Interestingly, CMake seems to have sometimes trouble finding libhid.a. For the MSVC builds, hid.lib is part of the Windows SDK, yet it shows
HAVE_LIBHID: HAVE_LIBHID-NOTFOUND
in the CI builds. On my machine at home, it saysHAVE_LIBHID: C:/Program Files (x86)/Windows Kits/10/Lib/10.0.22000.0/um/x64/hid.lib
, as one would expect.