libusb dependency can be disabled using CMake files - but it remove PN531USB and PN533USB support - this is useful for Windows newer than XP. (Thanks to Fkooman)
This commit is contained in:
parent
9e60b6e392
commit
3ec00eb06c
4 changed files with 35 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
|||
SET(LIBRARY-SOURCES libnfc dev_pn531 dev_pn533 rs232 bitutils dev_arygon)
|
||||
SET(LIBRARY-SOURCES libnfc rs232 bitutils dev_arygon)
|
||||
SET(TOOLS-SOURCES list mftool mfultool initiator target anticol emulate relay)
|
||||
|
||||
# find PCSC library and headers
|
||||
|
|
@ -9,7 +9,11 @@ IF(LIBNFC_PCSC)
|
|||
ENDIF(LIBNFC_PCSC)
|
||||
|
||||
# find libusb library and headers
|
||||
FIND_PACKAGE(LIBUSB REQUIRED)
|
||||
IF(LIBNFC_USB)
|
||||
FIND_PACKAGE(LIBUSB REQUIRED)
|
||||
ADD_DEFINITIONS("-DHAVE_LIBUSB=1")
|
||||
SET(LIBRARY-SOURCES ${LIBRARY-SOURCES} "dev_pn531 dev_pn533")
|
||||
ENDIF(LIBNFC_USB)
|
||||
|
||||
IF(LIBNFC_VERBOSE_OUTPUT)
|
||||
ADD_DEFINITIONS("-DDEBUG")
|
||||
|
|
|
|||
|
|
@ -26,8 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||
#ifdef HAVE_PCSC_LITE
|
||||
#include "dev_acr122.h"
|
||||
#endif
|
||||
#include "dev_pn531.h"
|
||||
#include "dev_pn533.h"
|
||||
#ifdef HAVE_LIBUSB
|
||||
#include "dev_pn531.h"
|
||||
#include "dev_pn533.h"
|
||||
#endif HAVE_LIBUSB
|
||||
#include "dev_arygon.h"
|
||||
|
||||
const static struct dev_callbacks dev_callbacks_list[] = {
|
||||
|
|
@ -35,8 +37,10 @@ const static struct dev_callbacks dev_callbacks_list[] = {
|
|||
#ifdef HAVE_PCSC_LITE
|
||||
{ "ACR122", dev_acr122_connect, dev_acr122_transceive, dev_acr122_disconnect },
|
||||
#endif
|
||||
#ifdef HAVE_LIBUSB
|
||||
{ "PN531USB", dev_pn531_connect, dev_pn531_transceive, dev_pn531_disconnect },
|
||||
{ "PN533USB", dev_pn533_connect, dev_pn533_transceive, dev_pn533_disconnect },
|
||||
#endif HAVE_LIBUSB
|
||||
{ "ARYGON", dev_arygon_connect, dev_arygon_transceive, dev_arygon_disconnect }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue