Skip to content

Commit

Permalink
Link ykcore against pthread (keepassxreboot#7807)
Browse files Browse the repository at this point in the history
  • Loading branch information
Piraty authored Apr 15, 2022
1 parent 692c95b commit 7edecee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/thirdparty/ykcore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ if(WIN32)
elseif(UNIX AND NOT APPLE)
target_sources(ykcore PRIVATE ykcore_libusb-1.0.c)

find_package(Threads REQUIRED)

find_library(LIBUSB_LIBRARY NAMES usb-1.0)
find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h PATH_SUFFIXES "libusb-1.0" "libusb")
if(NOT LIBUSB_LIBRARY OR NOT LIBUSB_INCLUDE_DIR)
message(FATAL_ERROR "libusb-1.0 dev package required, but not found")
endif()

target_link_libraries(ykcore PRIVATE ${LIBUSB_LIBRARY})
target_link_libraries(ykcore PRIVATE Threads::Threads ${LIBUSB_LIBRARY})
target_include_directories(ykcore PRIVATE ${LIBUSB_INCLUDE_DIR})
target_compile_definitions(ykcore PRIVATE _GNU_SOURCE)
elseif(APPLE)
Expand Down

0 comments on commit 7edecee

Please sign in to comment.