pupil-labs / libuvc

a cross-platform library for USB video devices
https://int80k.com/libuvc/
Other
51 stars 30 forks source link

Add libusb lib location explicitly; Windows incompatible? #32

Closed papr closed 1 year ago

papr commented 5 years ago

Needs to be tested on Linux and on Windows. @pointcontrols mentioned, that this change might break building on Windows. If this is true, we need to add a case discrimination for the changes.

pfaion commented 5 years ago

While trying to test this I realized that the docs seem to be out-of-date here: https://docs.pupil-labs.com/#libuvc

LIBUSB_LIBRARY_NAMES and PTHREAD_LIBRARY_NAMES do not exist anymore, but are now called *_LIBRARIES.

Also: cmake requires forward-slashes for paths even on windows, the docs have backslashes.

Once I can confirm that this works I will create a PR for the docs to update.

pfaion commented 5 years ago

Another issue with the docs: https://docs.pupil-labs.com/#libusb references building as static lib: image This will result in the libraries being stored to C:\work\libusb\x64\Release\lib\libusb-1.0.lib while the docs reference C:\work\libusb\x64\Release\dll\libusb-1.0.lib (dll instead of lib)

pfaion commented 5 years ago

Building fails when following the instructions in the docs (and trying to make it work, see my previous comments).

libuvc/libuvc_internal.h(17): fatal error C1083: Cannot open include file: 'libusb.h': No such file or directory

I'll test from master to see if this is an issue of this branch.

pfaion commented 5 years ago

Current master also fails to build on windows, but at a later step. Seems like this indeed breaks windows (a bit more).

pfaion commented 5 years ago

I opened an issue on the docs for the required changes: https://github.com/pupil-labs/pupil-docs/issues/272