Fix cmake warning
CMake Warning (dev) at libnfc/CMakeLists.txt:77 (ADD_LIBRARY): Policy CMP0115 is not set: Source file extensions must be explicit. Run "cmake --help-policy CMP0115" for policy details. Use the cmake_policy command to set the policy and suppress this warning. File: /home/rousseau/Documents/github/libnfc/libnfc/nfc.c This warning is for project developers. Use -Wno-dev to suppress it.
This commit is contained in:
parent
92cc3b1ed1
commit
c6657c7c00
2 changed files with 22 additions and 22 deletions
|
@ -16,62 +16,62 @@ SET(LIBNFC_DRIVER_PN53X_USB ON CACHE BOOL "Enable PN531 and PN531 USB support (D
|
|||
IF(LIBNFC_DRIVER_PCSC)
|
||||
FIND_PACKAGE(PCSC REQUIRED)
|
||||
ADD_DEFINITIONS("-DDRIVER_PCSC_ENABLED")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pcsc")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pcsc.c")
|
||||
ENDIF(LIBNFC_DRIVER_PCSC)
|
||||
|
||||
IF(LIBNFC_DRIVER_ACR122_PCSC)
|
||||
FIND_PACKAGE(PCSC REQUIRED)
|
||||
ADD_DEFINITIONS("-DDRIVER_ACR122_PCSC_ENABLED")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_pcsc")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_pcsc.c")
|
||||
ENDIF(LIBNFC_DRIVER_ACR122_PCSC)
|
||||
|
||||
IF(LIBNFC_DRIVER_ACR122_USB)
|
||||
FIND_PACKAGE(LIBUSB REQUIRED)
|
||||
ADD_DEFINITIONS("-DDRIVER_ACR122_USB_ENABLED")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_usb")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_usb.c")
|
||||
ENDIF(LIBNFC_DRIVER_ACR122_USB)
|
||||
|
||||
IF(LIBNFC_DRIVER_ACR122S)
|
||||
ADD_DEFINITIONS("-DDRIVER_ACR122S_ENABLED")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122s")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122s.c")
|
||||
SET(UART_REQUIRED TRUE)
|
||||
ENDIF(LIBNFC_DRIVER_ACR122S)
|
||||
|
||||
IF(LIBNFC_DRIVER_ARYGON)
|
||||
ADD_DEFINITIONS("-DDRIVER_ARYGON_ENABLED")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/arygon")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/arygon.c")
|
||||
SET(UART_REQUIRED TRUE)
|
||||
ENDIF(LIBNFC_DRIVER_ARYGON)
|
||||
|
||||
IF(LIBNFC_DRIVER_PN532_I2C)
|
||||
ADD_DEFINITIONS("-DDRIVER_PN532_I2C_ENABLED")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_i2c")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_i2c.c")
|
||||
SET(I2C_REQUIRED TRUE)
|
||||
ENDIF(LIBNFC_DRIVER_PN532_I2C)
|
||||
|
||||
IF(LIBNFC_DRIVER_PN532_SPI)
|
||||
ADD_DEFINITIONS("-DDRIVER_PN532_SPI_ENABLED")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_spi")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_spi.c")
|
||||
SET(SPI_REQUIRED TRUE)
|
||||
ENDIF(LIBNFC_DRIVER_PN532_SPI)
|
||||
|
||||
IF(LIBNFC_DRIVER_PN532_UART)
|
||||
ADD_DEFINITIONS("-DDRIVER_PN532_UART_ENABLED")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_uart")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn532_uart.c")
|
||||
SET(UART_REQUIRED TRUE)
|
||||
ENDIF(LIBNFC_DRIVER_PN532_UART)
|
||||
|
||||
IF(LIBNFC_DRIVER_PN53X_USB)
|
||||
FIND_PACKAGE(LIBUSB REQUIRED)
|
||||
ADD_DEFINITIONS("-DDRIVER_PN53X_USB_ENABLED")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn53x_usb")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/pn53x_usb.c")
|
||||
SET(USB_REQUIRED TRUE)
|
||||
ENDIF(LIBNFC_DRIVER_PN53X_USB)
|
||||
|
||||
IF(LIBNFC_DRIVER_ACR122_USB)
|
||||
FIND_PACKAGE(LIBUSB REQUIRED)
|
||||
ADD_DEFINITIONS("-DDRIVER_ACR122_USB_ENABLED")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_usb")
|
||||
SET(DRIVERS_SOURCES ${DRIVERS_SOURCES} "drivers/acr122_usb.c")
|
||||
SET(USB_REQUIRED TRUE)
|
||||
ENDIF(LIBNFC_DRIVER_ACR122_USB)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Windows MinGW workarounds
|
||||
IF(WIN32)
|
||||
SET(WINDOWS_SOURCES ../contrib/win32/stdlib)
|
||||
SET(WINDOWS_SOURCES ../contrib/win32/stdlib.c)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../contrib/win32)
|
||||
|
||||
# Add in the rc for version information in the dll
|
||||
|
@ -11,39 +11,39 @@ IF(WIN32)
|
|||
ENDIF(WIN32)
|
||||
|
||||
# Library's chips
|
||||
SET(CHIPS_SOURCES chips/pn53x)
|
||||
SET(CHIPS_SOURCES chips/pn53x.c)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/chips)
|
||||
|
||||
# Library's buses
|
||||
IF(USB_REQUIRED)
|
||||
LIST(APPEND BUSES_SOURCES buses/usbbus)
|
||||
LIST(APPEND BUSES_SOURCES buses/usbbus.c)
|
||||
ENDIF(USB_REQUIRED)
|
||||
|
||||
IF(UART_REQUIRED)
|
||||
IF(WIN32)
|
||||
# Windows have a special implementation for UART
|
||||
LIST(APPEND BUSES_SOURCES ../contrib/win32/libnfc/buses/uart)
|
||||
LIST(APPEND BUSES_SOURCES ../contrib/win32/libnfc/buses/uart.c)
|
||||
ELSE(WIN32)
|
||||
LIST(APPEND BUSES_SOURCES buses/uart)
|
||||
LIST(APPEND BUSES_SOURCES buses/uart.c)
|
||||
ENDIF(WIN32)
|
||||
ENDIF(UART_REQUIRED)
|
||||
|
||||
IF(I2C_REQUIRED)
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
LIST(APPEND BUSES_SOURCES buses/i2c)
|
||||
LIST(APPEND BUSES_SOURCES buses/i2c.c)
|
||||
ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
# Only Linux is supported at the moment
|
||||
#LIST(APPEND BUSES_SOURCES ../contrib/win32/libnfc/buses/i2c)
|
||||
#LIST(APPEND BUSES_SOURCES ../contrib/win32/libnfc/buses/i2c.c)
|
||||
MESSAGE( FATAL_ERROR "I2C is only (yet) supported in Linux!" )
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
ENDIF(I2C_REQUIRED)
|
||||
|
||||
IF(SPI_REQUIRED)
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
LIST(APPEND BUSES_SOURCES buses/spi)
|
||||
LIST(APPEND BUSES_SOURCES buses/spi.c)
|
||||
ELSE(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
# Only Linux is supported at the moment
|
||||
#LIST(APPEND BUSES_SOURCES ../contrib/win32/libnfc/buses/spi)
|
||||
#LIST(APPEND BUSES_SOURCES ../contrib/win32/libnfc/buses/spi.c)
|
||||
MESSAGE( FATAL_ERROR "SPI is only (yet) supported in Linux!" )
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
ENDIF(SPI_REQUIRED)
|
||||
|
@ -61,7 +61,7 @@ IF(LIBUSB_FOUND)
|
|||
ENDIF(LIBUSB_FOUND)
|
||||
|
||||
# Library
|
||||
SET(LIBRARY_SOURCES nfc nfc-device nfc-emulation nfc-internal conf iso14443-subr mirror-subr target-subr ${DRIVERS_SOURCES} ${BUSES_SOURCES} ${CHIPS_SOURCES} ${WINDOWS_SOURCES})
|
||||
SET(LIBRARY_SOURCES nfc.c nfc-device.c nfc-emulation.c nfc-internal.c conf.c iso14443-subr.c mirror-subr.c target-subr.c ${DRIVERS_SOURCES} ${BUSES_SOURCES} ${CHIPS_SOURCES} ${WINDOWS_SOURCES})
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
IF(LIBNFC_LOG)
|
||||
|
@ -69,9 +69,9 @@ IF(LIBNFC_LOG)
|
|||
IF(MINGW)
|
||||
SET(CMAKE_C_FLAGS "-fgnu89-inline ${CMAKE_C_FLAGS}")
|
||||
ENDIF(MINGW)
|
||||
LIST(APPEND LIBRARY_SOURCES log ../contrib/win32/libnfc/log-internal)
|
||||
LIST(APPEND LIBRARY_SOURCES log.c ../contrib/win32/libnfc/log-internal.c)
|
||||
ELSE(WIN32)
|
||||
LIST(APPEND LIBRARY_SOURCES log log-internal)
|
||||
LIST(APPEND LIBRARY_SOURCES log.c log-internal.c)
|
||||
ENDIF(WIN32)
|
||||
ENDIF(LIBNFC_LOG)
|
||||
ADD_LIBRARY(nfc SHARED ${LIBRARY_SOURCES})
|
||||
|
|
Loading…
Reference in a new issue