Linux/CMake: find_package(hidapi) cannot find specific version (v0.12.0) #482
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi#482
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have built hidapi (0.12.0) from source (using git clone from git tag hidapi-0.12.0) and installed it into a local directory (/home/xxxx/.lib/hidapi-0.12.0/x86_64-linux-gnu).
When I now try to import it into my CMake build system using
find_package(hidapi 0.12.0 CONFIG REQUIRED), CMake rejects the installation.CMake Output:
Note that it is accepted when I remove the package version requirement from
find_package().This is strange, because all required files seem to be correctly installed:
Ok, renaming the file
libhidapi-version.cmaketohidapi-config-version.cmakesolves the problem, but I don't know enough about CMake to decide whether that is the correct solution.In addition, still the question remains whether the other files
libhidapi*.cmakeare named correctly.Those are correct, otherwise you wouldn't get CMake targets for HIDAPI working.