Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LIBUSB_INCLUDE_DIR value when using XLINK_LIBUSB_SYSTEM #78

Merged
merged 3 commits into from
Jun 17, 2024

Conversation

traversaro
Copy link
Contributor

Before this PR, with XLINK_LIBUSB_SYSTEM set to ON~ 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 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.

@traversaro
Copy link
Contributor Author

The Windows failure is unrelated and related to luxonis/depthai-core#1037 and cpp-pm/hunter#747 .

@themarpe themarpe requested a review from moratom June 17, 2024 15:57
@themarpe themarpe merged commit e0eddd9 into luxonis:master Jun 17, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants