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

[libusb] Fix usage #35498

Merged
merged 30 commits into from
Dec 14, 2023
Merged

Conversation

MonicaLiu0311
Copy link
Contributor

@MonicaLiu0311 MonicaLiu0311 commented Dec 5, 2023

Fixes #35480. Use libusb pkgconfig, remove vcpkg-cmake-wrapper.cmake.

The usage test passed on x64-windows (header files found):

libusb can be imported via CMake FindPkgConfig module:
    find_package(PkgConfig REQUIRED)
    pkg_check_modules(libusb REQUIRED IMPORTED_TARGET libusb-1.0)

    target_link_libraries(main PRIVATE PkgConfig::libusb)
  • Changes comply with the maintainer guide
  • SHA512s are updated for each updated download
  • The "supports" clause reflects platforms that may be fixed by this new version
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@MonicaLiu0311 MonicaLiu0311 added category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. labels Dec 5, 2023
ports/libusb/usage Outdated Show resolved Hide resolved
@dg0yt
Copy link
Contributor

dg0yt commented Dec 5, 2023

While I do recommend to suggest the imported target from pkg_check_modules for immediate downstream usage, it implies that immediate consumers must pkg_check_modules etc. to their exported CMake config. And also generated pc files must be checked to not list the target in Libs:.

@MonicaLiu0311
Copy link
Contributor Author

it implies that immediate consumers must pkg_check_modules etc

Please help confirm: b7199fd

And also generated pc files must be checked to not list the target in Libs:.

It has been checked locally.

@MonicaLiu0311 MonicaLiu0311 marked this pull request as ready for review December 8, 2023 10:22
@MonicaLiu0311
Copy link
Contributor Author

Feature libusb is tested successfully in the following ports:

pcl[libusb] 
freerdp[urbdrc]

gazebo[libusb] is not tested due to errors in its dependency dartsim which will not be resolved in this PR:

G:\vcpkg\buildtrees\dartsim\src\v6.12.2-05a3588b9d.clean\python\dartpy\gui\osg\GUIEventHandler.cpp(34): fatal error C1083: Cannot open include file: 'dart/gui/osg/osg.hpp': No such file or directory

@JonLiu1993 JonLiu1993 linked an issue Dec 12, 2023 that may be closed by this pull request
@FrankXie05 FrankXie05 added the info:reviewed Pull Request changes follow basic guidelines label Dec 13, 2023
@vicroms vicroms merged commit 8abeb71 into microsoft:master Dec 14, 2023
15 checks passed
@MonicaLiu0311 MonicaLiu0311 deleted the Dev/Monica/fix_libusb branch December 14, 2023 09:04
@pedroCX486
Copy link

I can't integrate this as a dependency after this PR, this broke my project.

@MonicaLiu0311
Copy link
Contributor Author

I can't integrate this as a dependency after this PR, this broke my project.

Please provide detailed error information.

Osyotr pushed a commit to Osyotr/vcpkg that referenced this pull request Jan 23, 2024
* fix usage

* update version

* redo x64-windows.cmake

* resolve conflicts

* updaet git-tree

* fix downstream

* update version

* fix libirecovery

* update git-tree

* fix pkg_check_modules

* update git-tree

* fix libfreenect2

* update version

* fix libuvc

* update version

* fix libuvc patch

* update git-tree

* fix libuvc build_fix.patch

* update git-tree

* format

* update git-tree

* undo supports

* update git-tree

* fix azure-kinect-sensor-sdk

* update version

* add pkg-config.exe

* update git-tree

* disable build examples and tests

* update git-tree

---------

Co-authored-by: Monica <v-liumonica@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMake Cannot Find Libusb Header Files
5 participants