2014-02-09 18:49:33 +04:00
|
|
|
# - Try to find PCSC
|
|
|
|
# Once done this will define
|
|
|
|
# PCSC_FOUND - pcsc was found
|
|
|
|
# PCSC_INCLUDE_DIRS - pcsc include directories
|
|
|
|
# PCSC_LIBRARIES - libraries needed for linking
|
2012-10-17 10:14:19 +04:00
|
|
|
|
2023-08-09 13:08:16 +03:00
|
|
|
find_package(PkgConfig)
|
2014-04-08 09:26:28 +04:00
|
|
|
|
|
|
|
if(PKG_CONFIG_FOUND)
|
|
|
|
pkg_check_modules(PC_PCSC QUIET libpcsclite)
|
2012-01-27 05:13:08 +04:00
|
|
|
endif()
|
|
|
|
|
2014-02-09 18:49:33 +04:00
|
|
|
find_path(PCSC_INCLUDE_DIR pcsclite.h WinSCard.h
|
2014-04-08 09:26:28 +04:00
|
|
|
HINTS ${PC_PCSC_INCLUDEDIR} ${PC_PCSC_INCLUDE_DIRS}
|
|
|
|
PATH_SUFFIXES PCSC)
|
2012-10-17 10:14:19 +04:00
|
|
|
|
2014-02-09 18:49:33 +04:00
|
|
|
find_library(PCSC_LIBRARY NAMES PCSC WinSCard pcsclite
|
2014-04-08 09:26:28 +04:00
|
|
|
HINTS ${PC_PCSC_LIBDIR} ${PC_PCSC_LIBRARY_DIRS})
|
2012-01-27 05:13:08 +04:00
|
|
|
|
2014-02-09 18:49:33 +04:00
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
find_package_handle_standard_args(PCSC DEFAULT_MSG PCSC_LIBRARY PCSC_INCLUDE_DIR)
|
2014-02-07 03:14:46 +04:00
|
|
|
|
2014-02-09 18:49:33 +04:00
|
|
|
set(PCSC_LIBRARIES ${PCSC_LIBRARY})
|
|
|
|
set(PCSC_INCLUDE_DIRS ${PCSC_INCLUDE_DIR})
|
2012-01-27 05:13:08 +04:00
|
|
|
|
|
|
|
mark_as_advanced(PCSC_INCLUDE_DIR PCSC_LIBRARY)
|
2012-10-17 10:14:19 +04:00
|
|
|
|
2014-04-08 09:26:28 +04:00
|
|
|
|