nbourdau/libfreenect — comment on commit be6a043845dbeabce1ed98cf5c4023fce8659685
File: cmake_modules/Findlibusb-1.0.cmake line 64
By nbourdau:

On 20/01/2012 16:08, Drew Fisher wrote:
> Is this liable to cause issues on systems where libusb-0.1 is
> installed? The usual pattern I see for having both installed is that
> libusb-0.1 is called "libusb.so", whereas libusb-1.0 is called
> "libusb-1.0.so"; will this line wind up finding and using libusb-0.1
> if libusb-1.0 is not installed? What about when both are present?

It cannot cause issues on systems where libusb-0.1 is installed because
it will search first for library called libusb-1.0.so. If libusb-0.1 is
present and libusb-1.0 is not, there is still no problem because in this
case, libusb.h will not be found. I have verified this on my linux laptop.

> (Is libusb-1.0 called libusb.so on Debian kfreebsd?)

Actually, kfreebsd does not use libusb-1.0 per se, but a library that
provides a compatible API. The same library provides also the libusb-0.1
API which is the reason, I believe, why they use the common name libusb.so

> We might also have to figure something out for the Windows side,
> where we do ugly things to emulate libusb-1's API using libusb-win32
> (which is a fork of libusb-0.1).

Sure, but it is just a matter of one include_path to check. (I don't
have easily access to a win32 development environment to test it).