aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorcslashm <cslashm@gmail.com>2018-08-01 09:24:53 +0200
committercslashm <cslashm@gmail.com>2018-09-24 21:57:42 +0200
commitbb6e3bbc0f0a6c4ac126f56ba75b39d0dfac01a6 (patch)
tree7c6e03ce2a27685b09bf65a06536113d954b574e /CMakeLists.txt
parentMerge pull request #4429 (diff)
downloadmonero-bb6e3bbc0f0a6c4ac126f56ba75b39d0dfac01a6.tar.xz
Replace USB-CCID (smartcard) by USB-HID
Remove PCSC dependencies which is a bit hard (not user friendly) to install on linux and Mac Split Ledger logic and device IO
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt30
1 files changed, 21 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a95e14b65..2b5a38509 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -435,7 +435,7 @@ if(STATIC AND NOT IOS)
endif()
endif()
-find_package(PCSC)
+find_package(HIDAPI)
add_definition_if_library_exists(c memset_s "string.h" HAVE_MEMSET_S)
add_definition_if_library_exists(c explicit_bzero "strings.h" HAVE_EXPLICIT_BZERO)
@@ -476,14 +476,14 @@ endif()
include_directories(${LIBUNWIND_INCLUDE})
link_directories(${LIBUNWIND_LIBRARY_DIRS})
-# Final setup for libpcsc
-if (PCSC_FOUND)
- message(STATUS "Using PCSC include dir at ${PCSC_INCLUDE_DIR}")
- add_definitions(-DHAVE_PCSC)
- include_directories(${PCSC_INCLUDE_DIR})
- link_directories(${LIBPCSC_LIBRARY_DIRS})
-else (PCSC_FOUND)
- message(STATUS "Could not find PCSC")
+# Final setup for hid
+if (HIDAPI_FOUND)
+ message(STATUS "Using HIDAPI include dir at ${HIDAPI_INCLUDE_DIR}")
+ add_definitions(-DHAVE_HIDAPI)
+ include_directories(${HIDAPI_INCLUDE_DIR})
+ link_directories(${LIBHIDAPI_LIBRARY_DIRS})
+else (HIDAPI_FOUND)
+ message(STATUS "Could not find HIDAPI")
endif()
if(MSVC)
@@ -881,6 +881,18 @@ endif()
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
+if (HIDAPI_FOUND)
+ if (APPLE)
+ find_library(COREFOUNDATION CoreFoundation)
+ find_library(IOKIT IOKit)
+ list(APPEND EXTRA_LIBRARIES ${IOKIT})
+ list(APPEND EXTRA_LIBRARIES ${COREFOUNDATION})
+ endif()
+ if (WIN32)
+ list(APPEND EXTRA_LIBRARIES setupapi)
+ endif()
+endif()
+
option(USE_READLINE "Build with GNU readline support." ON)
if(USE_READLINE)
find_package(Readline)