2019-09-03 15:50:28 +02:00
|
|
|
SET(LIBNFC_DRIVER_PCSC OFF CACHE BOOL "Enable PC/SC reader support (Depends on PC/SC)")
|
2013-03-27 23:12:59 +01:00
|
|
|
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)")
|
2010-04-20 10:45:31 +02:00
|
|
|
SET(LIBNFC_DRIVER_ARYGON ON CACHE BOOL "Enable ARYGON support (Use serial port)")
|
2021-08-14 11:58:54 +02:00
|
|
|
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
2013-06-15 00:41:20 +02:00
|
|
|
SET(LIBNFC_DRIVER_PN532_I2C ON CACHE BOOL "Enable PN532 I2C support (Use I2C bus)")
|
2013-03-27 23:25:43 +01:00
|
|
|
SET(LIBNFC_DRIVER_PN532_SPI ON CACHE BOOL "Enable PN532 SPI support (Use SPI bus)")
|
2021-08-14 11:58:54 +02:00
|
|
|
ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
2020-07-08 13:06:45 +02:00
|
|
|
SET(LIBNFC_DRIVER_PN532_I2C OFF CACHE BOOL "Enable PN532 I2C support (Use I2C bus)")
|
|
|
|
SET(LIBNFC_DRIVER_PN532_SPI OFF CACHE BOOL "Enable PN532 SPI support (Use SPI bus)")
|
2021-08-14 11:58:54 +02:00
|
|
|
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
2013-03-27 23:12:59 +01:00
|
|
|
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)")
|
2010-04-20 10:45:31 +02:00
|
|
|
|
2019-09-03 15:50:28 +02:00
|
|
|
IF(LIBNFC_DRIVER_PCSC)
|
|
|
|
FIND_PACKAGE(PCSC REQUIRED)
|
|
|
|
ADD_DEFINITIONS("-DDRIVER_PCSC_ENABLED")
|
2024-02-16 14:49:38 +01:00
|
|
|
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pcsc.c")
|
2019-09-03 15:50:28 +02:00
|
|
|
ENDIF(LIBNFC_DRIVER_PCSC)
|
|
|
|
|
2012-10-30 22:11:19 +01:00
|
|
|
IF(LIBNFC_DRIVER_ACR122_PCSC)
|
2010-04-26 15:00:41 +02:00
|
|
|
FIND_PACKAGE(PCSC REQUIRED)
|
2012-10-30 22:11:19 +01:00
|
|
|
ADD_DEFINITIONS("-DDRIVER_ACR122_PCSC_ENABLED")
|
2024-02-16 14:49:38 +01:00
|
|
|
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_pcsc.c")
|
2012-10-30 22:11:19 +01:00
|
|
|
ENDIF(LIBNFC_DRIVER_ACR122_PCSC)
|
2010-04-20 10:45:31 +02:00
|
|
|
|
2013-03-27 23:12:59 +01:00
|
|
|
IF(LIBNFC_DRIVER_ACR122_USB)
|
2010-04-26 15:00:41 +02:00
|
|
|
FIND_PACKAGE(LIBUSB REQUIRED)
|
2013-03-27 23:12:59 +01:00
|
|
|
ADD_DEFINITIONS("-DDRIVER_ACR122_USB_ENABLED")
|
2024-02-16 14:49:38 +01:00
|
|
|
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_usb.c")
|
2013-03-27 23:12:59 +01:00
|
|
|
ENDIF(LIBNFC_DRIVER_ACR122_USB)
|
|
|
|
|
|
|
|
IF(LIBNFC_DRIVER_ACR122S)
|
|
|
|
ADD_DEFINITIONS("-DDRIVER_ACR122S_ENABLED")
|
2024-02-16 14:49:38 +01:00
|
|
|
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122s.c")
|
2013-03-27 23:12:59 +01:00
|
|
|
SET(UART_REQUIRED TRUE)
|
|
|
|
ENDIF(LIBNFC_DRIVER_ACR122S)
|
2010-04-20 10:45:31 +02:00
|
|
|
|
|
|
|
IF(LIBNFC_DRIVER_ARYGON)
|
|
|
|
ADD_DEFINITIONS("-DDRIVER_ARYGON_ENABLED")
|
2024-02-16 14:49:38 +01:00
|
|
|
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/arygon.c")
|
2013-03-18 23:27:23 +01:00
|
|
|
SET(UART_REQUIRED TRUE)
|
2010-04-20 10:45:31 +02:00
|
|
|
ENDIF(LIBNFC_DRIVER_ARYGON)
|
|
|
|
|
2013-06-15 00:41:20 +02:00
|
|
|
IF(LIBNFC_DRIVER_PN532_I2C)
|
|
|
|
ADD_DEFINITIONS("-DDRIVER_PN532_I2C_ENABLED")
|
2024-02-16 14:49:38 +01:00
|
|
|
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_i2c.c")
|
2013-06-15 00:41:20 +02:00
|
|
|
SET(I2C_REQUIRED TRUE)
|
|
|
|
ENDIF(LIBNFC_DRIVER_PN532_I2C)
|
|
|
|
|
2013-03-27 23:25:43 +01:00
|
|
|
IF(LIBNFC_DRIVER_PN532_SPI)
|
|
|
|
ADD_DEFINITIONS("-DDRIVER_PN532_SPI_ENABLED")
|
2024-02-16 14:49:38 +01:00
|
|
|
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_spi.c")
|
2013-03-27 23:25:43 +01:00
|
|
|
SET(SPI_REQUIRED TRUE)
|
|
|
|
ENDIF(LIBNFC_DRIVER_PN532_SPI)
|
|
|
|
|
2010-04-20 10:45:31 +02:00
|
|
|
IF(LIBNFC_DRIVER_PN532_UART)
|
|
|
|
ADD_DEFINITIONS("-DDRIVER_PN532_UART_ENABLED")
|
2024-02-16 14:49:38 +01:00
|
|
|
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_uart.c")
|
2013-03-18 23:27:23 +01:00
|
|
|
SET(UART_REQUIRED TRUE)
|
2010-04-20 10:45:31 +02:00
|
|
|
ENDIF(LIBNFC_DRIVER_PN532_UART)
|
2010-04-26 15:00:41 +02:00
|
|
|
|
2013-03-27 23:12:59 +01:00
|
|
|
IF(LIBNFC_DRIVER_PN53X_USB)
|
|
|
|
FIND_PACKAGE(LIBUSB REQUIRED)
|
|
|
|
ADD_DEFINITIONS("-DDRIVER_PN53X_USB_ENABLED")
|
2024-02-16 14:49:38 +01:00
|
|
|
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn53x_usb.c")
|
2013-03-27 23:12:59 +01:00
|
|
|
SET(USB_REQUIRED TRUE)
|
|
|
|
ENDIF(LIBNFC_DRIVER_PN53X_USB)
|
2010-04-26 15:00:41 +02:00
|
|
|
|
2020-07-07 19:40:46 +02:00
|
|
|
IF(LIBNFC_DRIVER_ACR122_USB)
|
|
|
|
FIND_PACKAGE(LIBUSB REQUIRED)
|
|
|
|
ADD_DEFINITIONS("-DDRIVER_ACR122_USB_ENABLED")
|
2024-02-16 14:49:38 +01:00
|
|
|
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_usb.c")
|
2020-07-07 19:40:46 +02:00
|
|
|
SET(USB_REQUIRED TRUE)
|
|
|
|
ENDIF(LIBNFC_DRIVER_ACR122_USB)
|
|
|
|
|
2015-06-22 20:47:04 +02:00
|
|
|
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/libnfc/drivers)
|