Improve Windows platform support (Thanks to Glenn)

* Remove stdint for MSVC since MSVC is not supported anymore;
 * Fix libusb detection under Windows;
 * Fix PCSC detection (mingw-w64 now have PC/SC Winscard interface);
 * Ajust CMake files in order to make it compile (some examples have been disabled).
This commit is contained in:
Romuald Conty 2011-01-17 13:42:24 +00:00
parent f32013aba5
commit 58c5662f35
9 changed files with 16 additions and 745 deletions

View file

@ -22,7 +22,7 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/incl
# Win32
IF(WIN32)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/contrib/win32 ${CMAKE_CURRENT_SOURCE_DIR}/contrib/win32/stdint)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/contrib/win32)
ENDIF(WIN32)
# make it easy to locate CMake modules for finding libraries
@ -66,6 +66,13 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC)
# Workarounds for libusb in C99
ADD_DEFINITIONS(-Du_int8_t=uint8_t -Du_int16_t=uint16_t)
IF(MINGW)
# force MinGW-w64 in 32bit mode
ADD_DEFINITIONS(-m32)
SET(CMAKE_SHARED_LINKER_FLAGS -m32)
SET(CMAKE_EXE_LINKER_FLAGS -m32)
ENDIF(MINGW)
IF(NOT WIN32)
# Set some pkg-config variables
SET(prefix ${CMAKE_INSTALL_PREFIX})