summaryrefslogtreecommitdiff
path: root/cmake/FindPCSCLite.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindPCSCLite.cmake')
-rw-r--r--cmake/FindPCSCLite.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/FindPCSCLite.cmake b/cmake/FindPCSCLite.cmake
new file mode 100644
index 00000000..644c89b1
--- /dev/null
+++ b/cmake/FindPCSCLite.cmake
@@ -0,0 +1,18 @@
+if(WIN32)
+ add_library(PkgConfig::PCSCLITE INTERFACE IMPORTED)
+ target_link_libraries(PkgConfig::PCSCLITE INTERFACE winscard)
+ set(PCSCLITE_FOUND 1)
+elseif(MACOS)
+ qt_internal_find_apple_system_framework(FWPCSC PCSC)
+ add_library(PkgConfig::PCSCLITE INTERFACE IMPORTED)
+ target_link_libraries(PkgConfig::PCSCLITE INTERFACE ${FWPCSC})
+ set(PCSCLITE_FOUND 1)
+else()
+ find_package(PkgConfig QUIET)
+
+ pkg_check_modules(PCSCLITE libpcsclite IMPORTED_TARGET)
+endif()
+
+if(NOT TARGET PkgConfig::PCSCLITE)
+ set(PCSCLITE_FOUND 0)
+endif()