Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit 12783e1

Browse files
committed
cmake: do not cache libusb library if libusb-1.0 headers not found
Library found might be an older libusb version. Closes #158
1 parent b4eb2e7 commit 12783e1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmake/Findlibusb-1.0.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS)
8787
message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}")
8888
endif (NOT libusb_1_FIND_QUIETLY)
8989
else (LIBUSB_1_FOUND)
90+
unset(LIBUSB_1_LIBRARY CACHE)
9091
if (libusb_1_FIND_REQUIRED)
9192
message(FATAL_ERROR "Could not find libusb")
9293
endif (libusb_1_FIND_REQUIRED)

0 commit comments

Comments
 (0)