58c5662f35
* 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).
31 lines
967 B
CMake
31 lines
967 B
CMake
# - Try to find the PC/SC smart card library
|
|
# Once done this will define
|
|
#
|
|
# PCSC_FOUND - system has the PC/SC library
|
|
# PCSC_INCLUDE_DIRS - the PC/SC include directory
|
|
# PCSC_LIBRARIES - The libraries needed to use PC/SC
|
|
#
|
|
# Author: F. Kooman <fkooman@tuxed.net>
|
|
# Version: 20101019
|
|
#
|
|
|
|
FIND_PACKAGE (PkgConfig)
|
|
IF(PKG_CONFIG_FOUND)
|
|
# Will find PC/SC library on Linux/BSDs using PkgConfig
|
|
PKG_CHECK_MODULES(PCSC libpcsclite)
|
|
# PKG_CHECK_MODULES(PCSC QUIET libpcsclite) # IF CMake >= 2.8.2?
|
|
ENDIF(PKG_CONFIG_FOUND)
|
|
|
|
IF(NOT PCSC_FOUND)
|
|
# Will find PC/SC headers both on Mac and Windows
|
|
FIND_PATH(PCSC_INCLUDE_DIRS WinSCard.h)
|
|
# PCSC library is for Mac, WinSCard library is for Windows
|
|
FIND_LIBRARY(PCSC_LIBRARIES NAMES PCSC libwinscard)
|
|
ENDIF(NOT PCSC_FOUND)
|
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCSC DEFAULT_MSG
|
|
PCSC_LIBRARIES
|
|
PCSC_INCLUDE_DIRS
|
|
)
|
|
MARK_AS_ADVANCED(PCSC_INCLUDE_DIRS PCSC_LIBRARIES)
|