aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-11-26 20:27:29 +0200
committerRiccardo Spagni <ric@spagni.net>2018-11-26 20:27:29 +0200
commitb37ce24cdd82936805315155ee6fb80393d8eb18 (patch)
tree6d2a86f1accf78f289eda4915977b35b94735dbd /CMakeLists.txt
parentMerge pull request #4819 (diff)
parentdevice/trezor: webusb transport added, cmake fixes (diff)
downloadmonero-b37ce24cdd82936805315155ee6fb80393d8eb18.tar.xz
Merge pull request #4824
2ffe53d9 device/trezor: webusb transport added, cmake fixes (Dusan Klinec)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 3 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c38c673a..d942d31cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -513,15 +513,8 @@ else (HIDAPI_FOUND)
message(STATUS "Could not find HIDAPI")
endif()
-# Protobuf, optional. Required for TREZOR.
-include(FindProtobuf)
-find_package(Protobuf)
-if(Protobuf_FOUND)
- set(HAVE_PROTOBUF 1)
- add_definitions(-DHAVE_PROTOBUF=1)
-else(Protobuf_FOUND)
- message(STATUS "Could not find Protobuf")
-endif()
+# Trezor support check
+include(CheckTrezor)
if(MSVC)
add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /FIinline_c.h /D__SSE4_1__")
@@ -921,7 +914,7 @@ endif()
list(APPEND EXTRA_LIBRARIES ${CMAKE_DL_LIBS})
-if (HIDAPI_FOUND)
+if (HIDAPI_FOUND OR LibUSB_COMPILE_TEST_PASSED)
if (APPLE)
if(DEPENDS)
list(APPEND EXTRA_LIBRARIES "-framework Foundation -framework IOKit")