Skip to content

Commit

Permalink
added PC/SC driver to cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmorgner committed Sep 3, 2019
1 parent 75e5e23 commit 959a992
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ IF(NOT WIN32)
IF(LIBNFC_DRIVER_PN53X_USB)
SET(PKG_REQ ${PKG_REQ} "libusb")
ENDIF(LIBNFC_DRIVER_PN53X_USB)
IF(LIBNFC_DRIVER_PCSC)
SET(PKG_REQ ${PKG_REQ} "libpcsclite")
ENDIF(LIBNFC_DRIVER_ACR122)
IF(LIBNFC_DRIVER_ACR122)
SET(PKG_REQ ${PKG_REQ} "libpcsclite")
ENDIF(LIBNFC_DRIVER_ACR122)
Expand Down
7 changes: 7 additions & 0 deletions cmake/modules/LibnfcDrivers.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SET(LIBNFC_DRIVER_PCSC OFF CACHE BOOL "Enable PC/SC reader support (Depends on PC/SC)")
SET(LIBNFC_DRIVER_ACR122_PCSC OFF CACHE BOOL "Enable ACR122 support (Depends on PC/SC)")
SET(LIBNFC_DRIVER_ACR122_USB ON CACHE BOOL "Enable ACR122 support (Direct USB connection)")
SET(LIBNFC_DRIVER_ACR122S ON CACHE BOOL "Enable ACR122S support (Use serial port)")
Expand All @@ -12,6 +13,12 @@ ENDIF(WIN32)
SET(LIBNFC_DRIVER_PN532_UART ON CACHE BOOL "Enable PN532 UART support (Use serial port)")
SET(LIBNFC_DRIVER_PN53X_USB ON CACHE BOOL "Enable PN531 and PN531 USB support (Depends on libusb)")

IF(LIBNFC_DRIVER_PCSC)
FIND_PACKAGE(PCSC REQUIRED)
ADD_DEFINITIONS("-DDRIVER_PCSC_ENABLED")
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pcsc")
ENDIF(LIBNFC_DRIVER_PCSC)

IF(LIBNFC_DRIVER_ACR122_PCSC)
FIND_PACKAGE(PCSC REQUIRED)
ADD_DEFINITIONS("-DDRIVER_ACR122_PCSC_ENABLED")
Expand Down

0 comments on commit 959a992

Please sign in to comment.