--- bundled_deps/hidapi/CMakeLists.txt.orig 2024-09-18 13:39:04 UTC +++ bundled_deps/hidapi/CMakeLists.txt @@ -1,8 +1,9 @@ - if (WIN32) set(HIDAPI_IMPL win/hid.c) elseif (APPLE) set(HIDAPI_IMPL mac/hid.c) +elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(HIDAPI_IMPL libusb/hid.c) else () # Assume Linux or Unix other than Mac OS set(HIDAPI_IMPL linux/hid.c) @@ -16,4 +17,6 @@ target_link_libraries(hidapi PRIVATE dl) # Don't link the udev library, as there are two versions out there (libudev.so.0, libudev.so.1), so they are linked explicitely. # target_link_libraries(hidapi udev) target_link_libraries(hidapi PRIVATE dl) +elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + target_link_libraries(hidapi usb iconv) endif()