aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindLibUSB.cmake
diff options
context:
space:
mode:
authorDusan Klinec <dusan.klinec@gmail.com>2023-11-10 00:36:31 +0100
committerDusan Klinec <dusan.klinec@gmail.com>2024-04-10 18:19:22 +0200
commit4689ad2d3cf2fcc9ab1e499465ac306ea6d43f31 (patch)
treeb23ab3603ae8907647df85b9c1edd1380ba549d2 /cmake/FindLibUSB.cmake
parentMerge pull request #9004 (diff)
downloadmonero-4689ad2d3cf2fcc9ab1e499465ac306ea6d43f31.tar.xz
trezor: support c++17 and protobuf v25, libusb fix
- fix If there is no protobuf version installed, if fails - passphrase test fix, wallet keys init was missing
Diffstat (limited to '')
-rw-r--r--cmake/FindLibUSB.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmake/FindLibUSB.cmake b/cmake/FindLibUSB.cmake
index f701b6398..647f3c656 100644
--- a/cmake/FindLibUSB.cmake
+++ b/cmake/FindLibUSB.cmake
@@ -119,10 +119,6 @@ if ( LibUSB_FOUND )
list(APPEND TEST_COMPILE_EXTRA_LIBRARIES ${LibUSB_LIBRARIES})
set(CMAKE_REQUIRED_LIBRARIES ${TEST_COMPILE_EXTRA_LIBRARIES})
- check_library_exists ( "${LibUSB_LIBRARIES}" usb_open "" LibUSB_FOUND )
- check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_device_list "" LibUSB_VERSION_1.0 )
- check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_port_numbers "" LibUSB_VERSION_1.0.16 )
-
if((STATIC AND UNIX AND NOT APPLE AND NOT FREEBSD) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux") OR ANDROID)
find_library(LIBUDEV_LIBRARY udev)
if(LIBUDEV_LIBRARY)
@@ -132,6 +128,10 @@ if ( LibUSB_FOUND )
endif()
endif()
+ check_library_exists ( "${LibUSB_LIBRARIES}" usb_open "" LibUSB_FOUND )
+ check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_device_list "" LibUSB_VERSION_1.0 )
+ check_library_exists ( "${LibUSB_LIBRARIES}" libusb_get_port_numbers "" LibUSB_VERSION_1.0.16 )
+
# Library 1.0.16+ compilation test.
# The check_library_exists does not work well on Apple with shared libs.
if (APPLE OR LibUSB_VERSION_1.0.16 OR STATIC)
@@ -141,7 +141,7 @@ if ( LibUSB_FOUND )
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES=${LibUSB_INCLUDE_DIRS}"
"-DLINK_DIRECTORIES=${LibUSB_LIBRARIES}"
- LINK_LIBRARIES ${TEST_COMPILE_EXTRA_LIBRARIES}
+ LINK_LIBRARIES ${LibUSB_LIBRARIES} ${TEST_COMPILE_EXTRA_LIBRARIES}
OUTPUT_VARIABLE OUTPUT)
unset(TEST_COMPILE_EXTRA_LIBRARIES)
message(STATUS "LibUSB Compilation test: ${LibUSB_COMPILE_TEST_PASSED}")