diff --git a/CMakeLists.txt b/CMakeLists.txt index 576f6e7..03097ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/modules/LibnfcDrivers.cmake b/cmake/modules/LibnfcDrivers.cmake index a79c229..e3806d4 100644 --- a/cmake/modules/LibnfcDrivers.cmake +++ b/cmake/modules/LibnfcDrivers.cmake @@ -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)") @@ -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")