Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/cad/PrusaSlicer/files/patch-src_hidapi_CMakeLists.txt
16151 views
1
--- src/hidapi/CMakeLists.txt.orig 2020-03-21 10:55:51 UTC
2
+++ src/hidapi/CMakeLists.txt
3
@@ -1,8 +1,9 @@
4
-
5
if (WIN32)
6
set(HIDAPI_IMPL win/hid.c)
7
elseif (APPLE)
8
set(HIDAPI_IMPL mac/hid.c)
9
+elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
10
+ set(HIDAPI_IMPL libusb/hid.c)
11
else ()
12
# Assume Linux or Unix other than Mac OS
13
set(HIDAPI_IMPL linux/hid.c)
14
@@ -16,4 +17,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
15
# Don't link the udev library, as there are two versions out there (libudev.so.0, libudev.so.1), so they are linked explicitely.
16
# target_link_libraries(hidapi udev)
17
target_link_libraries(hidapi dl)
18
+elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
19
+ target_link_libraries(hidapi usb iconv)
20
endif()
21
22