File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -499,12 +499,14 @@ find_package(PCSC REQUIRED)
499499include_directories (SYSTEM ${PCSC_INCLUDE_DIRS} )
500500
501501if (UNIX AND NOT APPLE )
502- find_library (LIBUSB_LIBRARIES NAMES usb-1.0 REQUIRED )
502+ find_library (LIBUSB_LIBRARIES NAMES usb-1.0 usb REQUIRED )
503503 find_path (LIBUSB_INCLUDE_DIR NAMES libusb.h PATH_SUFFIXES "libusb-1.0" "libusb" REQUIRED )
504504 include_directories (SYSTEM ${LIBUSB_INCLUDE_DIR} )
505505
506506 # For PolKit QuickUnlock
507- find_library (KEYUTILS_LIBRARIES NAMES keyutils REQUIRED )
507+ if ("${CMAKE_SYSTEM} " MATCHES "Linux" )
508+ find_library (KEYUTILS_LIBRARIES NAMES keyutils REQUIRED )
509+ endif ()
508510endif ()
509511
510512# Find zxcvbn or use the bundled version
Original file line number Diff line number Diff line change @@ -336,7 +336,6 @@ target_link_libraries(keepassxc_core
336336 ${ZLIB_LIBRARIES}
337337 ${MINIZIP_LIBRARIES}
338338 ${ARGON2_LIBRARIES}
339- ${KEYUTILS_LIBRARIES}
340339 ${thirdparty_LIBRARIES} )
341340
342341# GUI Library Definition
@@ -363,6 +362,9 @@ if(HAIKU)
363362endif ()
364363if (UNIX AND NOT APPLE )
365364 target_link_libraries (keepassxc_core Qt5::DBus ${LIBUSB_LIBRARIES} )
365+ if ("${CMAKE_SYSTEM} " MATCHES "Linux" )
366+ target_link_libraries (keepassxc_core ${KEYUTILS_LIBRARIES} )
367+ endif ()
366368 if (WITH_X11)
367369 target_link_libraries (keepassxc_gui Qt5::X11Extras X11 )
368370 endif ()
Original file line number Diff line number Diff line change 1- # Copyright (C) 2021 KeePassXC Team <team@keepassxc.org>
1+ # Copyright (C) 2026 KeePassXC Team <team@keepassxc.org>
22#
33# This program is free software: you can redistribute it and/or modify
44# it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ elseif(UNIX AND NOT APPLE)
2929
3030 find_package (Threads REQUIRED )
3131
32- find_library (LIBUSB_LIBRARY NAMES usb-1.0 )
32+ find_library (LIBUSB_LIBRARY NAMES usb-1.0 usb )
3333 find_path (LIBUSB_INCLUDE_DIR NAMES libusb.h PATH_SUFFIXES "libusb-1.0" "libusb" )
3434 if (NOT LIBUSB_LIBRARY OR NOT LIBUSB_INCLUDE_DIR)
3535 message (FATAL_ERROR "libusb-1.0 dev package required, but not found" )
You can’t perform that action at this time.
0 commit comments