2010-11-17 09:29:41 +01:00
|
|
|
# - Try to find the PC/SC smart card library
|
|
|
|
# Once done this will define
|
2009-09-09 14:32:41 +02:00
|
|
|
#
|
2010-11-17 09:29:41 +01:00
|
|
|
# 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
|
2009-09-09 14:32:41 +02:00
|
|
|
#
|
|
|
|
# Author: F. Kooman <fkooman@tuxed.net>
|
2010-11-17 09:29:41 +01:00
|
|
|
# Version: 20101019
|
2009-09-09 14:32:41 +02:00
|
|
|
#
|
|
|
|
|
2010-11-17 09:29:41 +01:00
|
|
|
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)
|
2009-09-09 14:32:41 +02:00
|
|
|
|
2010-11-17 09:29:41 +01:00
|
|
|
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
|
2011-01-17 14:42:24 +01:00
|
|
|
FIND_LIBRARY(PCSC_LIBRARIES NAMES PCSC libwinscard)
|
2010-11-17 09:29:41 +01:00
|
|
|
ENDIF(NOT PCSC_FOUND)
|
2009-09-09 14:32:41 +02:00
|
|
|
|
2010-11-17 09:29:41 +01:00
|
|
|
INCLUDE(FindPackageHandleStandardArgs)
|
|
|
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCSC DEFAULT_MSG
|
|
|
|
PCSC_LIBRARIES
|
|
|
|
PCSC_INCLUDE_DIRS
|
|
|
|
)
|
|
|
|
MARK_AS_ADVANCED(PCSC_INCLUDE_DIRS PCSC_LIBRARIES)
|