CMake says: Could NOT find HIDAPI (missing: HIDAPI_LIBRARY) #47

Open
anthonydanza opened this Issue Nov 8, 2012 · 2 comments

Projects

None yet

3 participants

@anthonydanza

Hello there,

I'm just trying to run cmake so I can compile and use the examples (I'm OS X 10.7.3), but it tells me this:

CMake Error at /opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
Could NOT find HIDAPI (missing: HIDAPI_LIBRARY)
Call Stack (most recent call first):
/opt/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
cmake_modules/FindHIDAPI.cmake:33 (find_package_handle_standard_args)
CMakeLists.txt:11 (FIND_PACKAGE)

I thought this was supposed to work out of the box? Where am I supposed to put hidapi.h for cmake to be able to find it? I've got it in /opt/local/include and that's in my path...

Is there some directory variable that I have to change in one of the cmake config files? I tried changing HID_INCLUDE_DIR in FindHIDAPI.cmake to no avail.

Thanks!

Member
olorin commented Nov 8, 2012

I ended up compiling emokit manually rather than using cmake. It's something I've been intending to address; I can't verify this right now, but I seem to remember that removing the requires directive allows cmake to compile emokit successfully (assuming you have HIDAPI somewhere in your include and link paths).

Owner
qdot commented Nov 9, 2012

Ok, it says it can't find HID_LIBRARY, not HID_INCLUDE_PATH. So it's at least finding the header somewhere. I'm guessing you built the library and used --prefix=/opt, or else are using homebrew? You might try running:

cmake -DCMAKE_PREFIX_PATH=/opt [path to CMakeLists.txt]

@qdot qdot was assigned by bschumacher Jun 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment