Skip to content

CMake does not find installed HIDAPI on macOS #140

Description

@muellermartin

When HIDAPI is installed externally (e.g. via a package manager like Homebrew: brew install hidapi) and the tarball of libnitrokey is used, the current version of the CMakeLists.txt is not able to find this installation and fails with an error message like this:

CMake Error at CMakeLists.txt:78 (add_library):
  Cannot find source file:

    hidapi/mac/hid.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at CMakeLists.txt:78 (add_library):
  No SOURCES given to target: hidapi-libusb

This is because the CMake script searches for hidapi/mac/hid.c (see CMakeLists.txt line 78) in the current directory.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions