Update CMake files in order to correcly find libraries on Windows 64bits platform. (Thanks to Fkooman)
Add Windows README file. (Thanks to Fkooman)
This commit is contained in:
parent
7924d10fad
commit
831dbd31a4
3 changed files with 52 additions and 24 deletions
|
|
@ -1,11 +1,16 @@
|
|||
SET(LIBRARY-SOURCES libnfc dev_pn531 dev_pn533 rs232 bitutils dev_arygon)
|
||||
SET(TOOLS-SOURCES list mftool mfultool initiator target anticol emulate relay)
|
||||
|
||||
# find PCSC library and headers
|
||||
IF(LIBNFC_PCSC)
|
||||
FIND_PACKAGE(PCSC REQUIRED)
|
||||
ADD_DEFINITIONS("-DHAVE_PCSC_LITE=1")
|
||||
SET(LIBRARY-SOURCES ${LIBRARY-SOURCES} "dev_acr122")
|
||||
ENDIF(LIBNFC_PCSC)
|
||||
|
||||
# find libusb library and headers
|
||||
FIND_PACKAGE(LIBUSB REQUIRED)
|
||||
|
||||
IF(LIBNFC_VERBOSE_OUTPUT)
|
||||
ADD_DEFINITIONS("-DDEBUG")
|
||||
ENDIF(LIBNFC_VERBOSE_OUTPUT)
|
||||
|
|
@ -21,36 +26,15 @@ ENDIF(LIBNFC_LANG_C99 AND NOT MSVC)
|
|||
IF(MSVC)
|
||||
# Hide some warnings, this should be fixed in the code instead!
|
||||
ADD_DEFINITIONS("-D_CRT_SECURE_NO_WARNINGS")
|
||||
ENDIF(MSVC)
|
||||
|
||||
IF(MSVC)
|
||||
# Include the stdint headers, because MSVC does not have them
|
||||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../win32/stdint)
|
||||
|
||||
# This is from libusb-win32.sourceforge.net
|
||||
SET(LIBUSB_INCLUDE_DIRS $ENV{ProgramFiles}/LibUSB-Win32/include)
|
||||
SET(LIBUSB_LIBRARIES $ENV{ProgramFiles}/LibUSB-Win32/lib/msvc/libusb.lib)
|
||||
|
||||
IF(LIBNFC_PCSC)
|
||||
# This is included with Visual Studio Express 2008, we should really use
|
||||
# something that finds this library, whatever the MSVC version
|
||||
SET(LIBPCSCLITE_LIBRARIES "$ENV{ProgramFiles}/Microsoft SDKs/Windows/v6.0A/Lib/WinSCard.Lib")
|
||||
# On MSVC we don't need the winscard.h header in the include path because
|
||||
# it already is there...
|
||||
ENDIF(LIBNFC_PCSC)
|
||||
ELSE(MSVC)
|
||||
# On Unix we just use pkg-config
|
||||
PKG_CHECK_MODULES(LIBUSB REQUIRED libusb)
|
||||
IF(LIBNFC_PCSC)
|
||||
PKG_CHECK_MODULES(LIBPCSCLITE REQUIRED libpcsclite)
|
||||
ENDIF(LIBNFC_PCSC)
|
||||
ENDIF(MSVC)
|
||||
|
||||
INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIRS} ${LIBPCSCLITE_INCLUDE_DIRS})
|
||||
INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIRS} ${PCSC_INCLUDE_DIRS})
|
||||
|
||||
# Library
|
||||
ADD_LIBRARY(nfc SHARED ${LIBRARY-SOURCES})
|
||||
TARGET_LINK_LIBRARIES(nfc ${LIBUSB_LIBRARIES} ${LIBPCSCLITE_LIBRARIES})
|
||||
TARGET_LINK_LIBRARIES(nfc ${LIBUSB_LIBRARIES} ${PCSC_LIBRARIES})
|
||||
SET_TARGET_PROPERTIES(nfc PROPERTIES SOVERSION 0 VERSION 0.0.0)
|
||||
|
||||
IF(MSVC)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue