CMake export/include is broken for macOS Framework build #492
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#492
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?
A rare combination of building HIDAPI on macOS as a standalone package (potentially to be installed somewhere in the system) but as a macOS Framework (as opposed to just Shared/Dylib library) have a
hidapi::includeCMake target broken.NOTE: for a
subdirectoryvariant of the build - there is no issues. It only happenes when HIDAPI is built (and installed) as a standalone project and then used as a CMake package (withfind_package).There is two reasons for that:
CMAKE_INSTALL_INCLUDEDIR;-L <path to framework>+-framework hidapi, which would add the Framework include path automatically, but it linked directly to the Framework binary (i.e.hidapi.framework/Contents/hidapi);At the end, we need to figure a workaround for HIDAPI - either fix
hidapi::includetarget manually, or manually fix thehidapi::darwintarget for Framework build, or both.NOTE2: it is a shame CMake doesn't properly supports this scenario of-the-box and I couldn't find any WIP in this direction.
The workaround on HIDAPI side is our best shot at getting it work properly (and, potentially as a public example for other projects).