Windows support contribution:
- Move CMake modules from cmake_modules/ to cmake/modules/ - CMake now use cmake/config_windows.h.cmake to create config.h on Windows platform - contrib/windows.h header is automagically included by config.h - Put missing NFC_EXPORT macro on front of emulation API - nfc-mfclassic and nfc-mfcultralight examples are now compiled under Windows Many thanks to Glenn Ergeerts which provide the initial patch.
This commit is contained in:
parent
b471f56c52
commit
5db8be908b
20 changed files with 37 additions and 31 deletions
|
|
@ -22,6 +22,9 @@ SET(LIBRARY_SOURCES nfc nfc-device nfc-emulation iso14443-subr mirror-subr ${DRI
|
|||
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
ADD_LIBRARY(nfc SHARED ${LIBRARY_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(nfc ${LIBUSB_LIBRARIES} ${PCSC_LIBRARIES})
|
||||
IF(WIN32)
|
||||
TARGET_LINK_LIBRARIES(nfc wsock32)
|
||||
ENDIF(WIN32)
|
||||
SET_TARGET_PROPERTIES(nfc PROPERTIES SOVERSION 0)
|
||||
|
||||
IF(WIN32)
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ uart_receive (serial_port sp, byte_t * pbtRx, const size_t szRx, int iAbortFd)
|
|||
if (!ReadFile (((serial_port_windows *) sp)->hPort, pbtRx, dwRxLen, &dwRxLen, NULL)) {
|
||||
return DEIO;
|
||||
}
|
||||
return (dwRwLen == (DWORD) szRx) ? 0 : DEIO;
|
||||
return (dwRxLen == (DWORD) szRx) ? 0 : DEIO;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
|
|
@ -43,10 +43,6 @@
|
|||
#include "mirror-subr.h"
|
||||
#include "nfc-internal.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "contrib/windows.h"
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#define CHIP_DATA(pnd) ((struct pn53x_data*)(pnd->chip_data))
|
||||
|
|
|
|||
|
|
@ -26,6 +26,10 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#include "nfc-internal.h"
|
||||
|
||||
nfc_device_t *
|
||||
|
|
|
|||
|
|
@ -39,10 +39,6 @@
|
|||
|
||||
#include <nfc/nfc.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "contrib/windows.h"
|
||||
#endif
|
||||
|
||||
#include "drivers.h"
|
||||
#include "nfc-internal.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue