You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have built hidapi (0.12.0) from source and installed it into a local directory (/home/xxxx/.lib/hidapi-0.12.0/x86_64-linux-gnu) using following commands:
Note that installation prefix is missing here from the INTERFACE_INCLUDE_DIRECTORIES path.
In consequence, CMake outputs the following error when I try to consume the hidapi::hidapi target from another project:
CMake Error in CMakeLists.txt:
Imported target "hidapi::hidapi" includes non-existent path
"/hidapi"
in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:
* The path was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and references files it does not
provide.
The text was updated successfully, but these errors were encountered:
Reason found: src/CMakeLists.txt uses CMAKE_INSTALL_INCLUDEDIR for definition of target include directories of hidapi_include before it is defined by GNUInstallDirs:
Interesting fact: CMAKE_INSTALL_INCLUDEDIR is empty only during the initial CMake run.
That's probably why I didn't catch it myself - I usually run cmake many times while I test anything locally.
Definitely need a good CI check for that.
I have built hidapi (0.12.0) from source and installed it into a local directory (/home/xxxx/.lib/hidapi-0.12.0/x86_64-linux-gnu) using following commands:
hidapi
properly installes into the correct location, but the resulting contents of the generatedlibhidapi.cmake
file includes these lines:Note that installation prefix is missing here from the INTERFACE_INCLUDE_DIRECTORIES path.
In consequence, CMake outputs the following error when I try to consume the
hidapi::hidapi
target from another project:The text was updated successfully, but these errors were encountered: