ports/cad/PrusaSlicer/files/patch-src_hidapi_CMakeLists.txt
teodorsigaev@gmail.com 3d8cf46cdb cad/PrusaSlicer: update to 2.5.0
ChangeLog: https://www.freshports.org/cad/PrusaSlicer/

PR:		267772
Reported by:	teodorsigaev@gmail.com (maintainer)
2022-11-18 17:13:31 +01:00

20 lines
727 B
Text

--- src/hidapi/CMakeLists.txt.orig 2022-09-06 07:09:19 UTC
+++ src/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 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
# 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 dl)
+elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ target_link_libraries(hidapi usb iconv)
endif()