Skip to content

cmake: include static backend dependencies in pkg-config files - #861

Open
BillyONeal wants to merge 2 commits into
libusb:masterfrom
BillyONeal:cmake-pkgconfig-static-deps
Open

BillyONeal wants to merge 2 commits into
libusb:masterfrom
BillyONeal:cmake-pkgconfig-static-deps

Conversation

@BillyONeal

@BillyONeal BillyONeal commented Nov 21, 2026 •

Copy link
Copy Markdown

This PR is due to pointing code review bots at the vcpkg submission: microsoft/vcpkg#55112 Against that submission, GPT 6.2 Sol notes:

Missing static link dependencies in new pkg-config modules. The new generic hidapi.pc selects a backend but omits its static link dependencies: libudev on Linux and libusb on Android (src/CMakeLists.txt). The new hidapi-darwin.pc likewise omits IOKit and CoreFoundation (mac/CMakeLists.txt).

[...]

The older hidraw, libusb, and generic macOS modules already omitted required libraries or frameworks; those omissions remain.

GPT 6.2 Sol wrote these changes to fix those problems. About these changes, it notes:

Keep the generic and backend-specific modules in sync so pkg-config --static reports the libraries used by the selected backend. Only declare a libusb module dependency when discovery used pkg-config; a parent-provided CMake target may not install a module.

Assisted-by: github-copilot:gpt-6.2-sol

Keep the generic and backend-specific modules in sync so pkg-config --static reports the libraries used by the selected backend. Only declare a libusb module dependency when discovery used pkg-config; a parent-provided CMake target may not install a module.

Assisted-by: github-copilot:gpt-6.2-sol
Keep the shared templates compatible with config.status so the Cflags line and existing FreeBSD private requirements survive. Substitute an empty value for the CMake-specific private linker field in Autotools.

Assisted-by: github-copilot:gpt-6.2-sol
@BillyONeal
BillyONeal marked this pull request as ready for review November 21, 2026 01:36

This branch has not been deployed

No deployments
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.

1 participant