The PR branch was successfully compiled and the generating the 2FA token for my account worked nicely. Thanks alot!
libnitrokey.pro file I changed the unix:!mac block around line 57 to look like
# SOURCES += $$PWD/hidapi/linux/hid.c
# LIBS += -lhidapi-libusb
LIBS += -lhidapi
/usr/local/include/hidapi-libusb is a link to
/usr/local/include/hidapi but I don’t know why it was not working.
And regarding cmake,yes I tried using it. But it still does complain about not finding the hidapi-libusb library. As I never used cmake before, but had some experience I used the other way discribed in the README at github and it turned out more comfortable for me with the feedback it provided. Because cmake is still complaining about the missing header file I’m suspecting that I’m missing something in my configuration - but I’ll ask about that in the FreeBSD forums.
Again thanks a lot for helping me!