Fix LIBUSB_INCLUDE_DIR value when using XLINK_LIBUSB_SYSTEM #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this PR, with
XLINK_LIBUSB_SYSTEM
set toON~ if
libusbwas installed in
<install_prefix>, the
LIBUSB_INCLUDE_DIRvariable contained the path
<install_prefix>\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 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.