-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[treehopper] Fix dependence libusb #35480
[treehopper] Fix dependence libusb #35480
Conversation
target_link_libraries(treehopper pthread ${CORE_FOUNDATION} ${IOKIT}) | ||
elseif(UNIX) | ||
- target_link_libraries(treehopper usb-1.0 pthread) | ||
+ find_package(libusb CONFIG REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ find_package(libusb CONFIG REQUIRED) | |
+ find_package(libusb REQUIRED) |
There is no config, so don't hard-code it. (There is not even a find module. Just a vcpkg wrapper.)
+++ b/C++/API/CMakeLists.txt | ||
@@ -37,7 +37,9 @@ if(APPLE) | ||
find_library(IOKIT IOKit) | ||
target_link_libraries(treehopper pthread ${CORE_FOUNDATION} ${IOKIT}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTR IMO this should also be patched, to decouple cached artifacts from local SDK paths. Untested:
target_link_libraries(treehopper pthread ${CORE_FOUNDATION} ${IOKIT}) | |
target_link_libraries(treehopper pthread "-framework CoreFoundation" "-framework IOKit") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to change the behavior of upstream:
find_library(IOKIT IOKit)
…kXie05/vcpkg into dev/Frank/treehopper_libusb
Use libusb pkgconfig, not vcpkg's cmake package hack. |
I'm pretty sure in general that we currently prefer the unofficial cmake package because we don't have a great answer for what happens for pkgconfig on Windows, as downstream consumers of us don't usually have a copy of pkgconfig that their CMake is going to find. That also said, that doesn't apply in this case because the libusb backend is never selected on Windows. |
Just depend on port |
Not in downstream's CMake |
It does. Did you forgot about: vcpkg/scripts/buildsystems/vcpkg.cmake Lines 557 to 590 in c6f9a7b
Since |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
LLVM failure was a random ICE we aren't normally seeing in CI, so let's hope simply rerunning fixes it |
"Without problems" is not true. |
Fix #35435 (comment)
Note: Fix correct
libusb
usage.Error:
SHA512s are updated for each updated download./vcpkg x-add-version --all
and committing the result.