xantares / nfc-bindings

scripting language bindings for libnfc
BSD 3-Clause "New" or "Revised" License
23 stars 9 forks source link

No package 'libnfc' found #13

Closed Franklin62120 closed 4 years ago

Franklin62120 commented 4 years ago

Hi !! seems cmake is unable to find libnfc.

respeaker@v2:~$ nfc-list -v
nfc-list uses libnfc 1.7.1
NFC device: pn532_i2c:/dev/i2c-3 opened
0 ISO14443A passive target(s) found.

0 Felica (212 kbps) passive target(s) found.

0 Felica (424 kbps) passive target(s) found.

0 ISO14443B passive target(s) found.

0 ISO14443B' passive target(s) found.

0 ISO14443B-2 ST SRx passive target(s) found.

0 ISO14443B-2 ASK CTx passive target(s) found.

0 Jewel passive target(s) found.

respeaker@v2:~$ git clone https://github.com/xantares/nfc-bindings.git
Cloning into 'nfc-bindings'...
remote: Enumerating objects: 425, done.
remote: Total 425 (delta 0), reused 0 (delta 0), pack-reused 425
Receiving objects: 100% (425/425), 67.85 KiB | 0 bytes/s, done.
Resolving deltas: 100% (247/247), done.
respeaker@v2:~$ cd nfc-bindings/
respeaker@v2:~/nfc-bindings$ cmake -DCMAKE_INSTALL_PREFIX=~/.local .
-- The C compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") 
-- Checking for module 'libnfc'
--   No package 'libnfc' found
CMake Error at /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
  Could NOT find LibNFC (missing: LIBNFC_LIBRARY LIBNFC_INCLUDE_DIR)
  (Required is at least version "1.7.1")
Call Stack (most recent call first):
  /usr/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindLibNFC.cmake:68 (find_package_handle_standard_args)
  CMakeLists.txt:17 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/respeaker/nfc-bindings/CMakeFiles/CMakeOutput.log".

I'm on Debian GNU/Linux 9.5 (stretch)

xantares commented 4 years ago

Works for me. Did you install the headers ?

Franklin62120 commented 4 years ago

Do you means this : libnfc5 libnfc-bin libnfc-examples ? If yes, I did it.

xantares commented 4 years ago

Try libnfc-dev