Skip to content

Fix LIBUSB_INCLUDE_DIR value when using XLINK_LIBUSB_SYSTEM#78

Merged
themarpe merged 3 commits intoluxonis:masterfrom
traversaro:patch-3
Jun 17, 2024
Merged

Fix LIBUSB_INCLUDE_DIR value when using XLINK_LIBUSB_SYSTEM#78
themarpe merged 3 commits intoluxonis:masterfrom
traversaro:patch-3

Conversation

@traversaro
Copy link
Copy Markdown
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
Copy Markdown
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
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