Before this PR, with XLINK_LIBUSB_SYSTEM set to ON~ iflibusbwas installed in, theLIBUSB_INCLUDE_DIRvariable contained the path\include\libusb-1.0`.
However, the code itself includes the libusb headers as #include <libusb-1.0\libusb.h>, and so using <install_prefix>\include\libusb-1.0 resulted in errors related to the fact that libusb-1.0\libusb.h could not be found.
After this PR, LIBUSB_INCLUDE_DIR variable will contain the path <install_prefix>\include, ensuring that the correct include header is passed to the pre-processor.
I guess that this problem was never detected as the <install_prefix>\include of libusb was in the header path of the system, and so the compilation ended up well anyhow, but the compilation fails if the external libusb used is not installed in the system prefix.
Before this PR, with\include\libusb-1.0`.
XLINK_LIBUSB_SYSTEM
set toON~ if
libusbwas installed in
, the
LIBUSB_INCLUDE_DIRvariable contained the path
However, the code itself includes the libusb headers as
#include <libusb-1.0\libusb.h>
, and so using<install_prefix>\include\libusb-1.0
resulted in errors related to the fact thatlibusb-1.0\libusb.h
could not be found.After this PR,
LIBUSB_INCLUDE_DIR
variable will contain the path<install_prefix>\include
, ensuring that the correct include header is passed to the pre-processor.I guess that this problem was never detected as the
<install_prefix>\include
of libusb was in the header path of the system, and so the compilation ended up well anyhow, but the compilation fails if the external libusb used is not installed in the system prefix.