From 265656cc358051e388594c0e2a0ed69102405215 Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Mon, 8 Sep 2014 15:39:15 +0200 Subject: [PATCH] cmake: do not cache libusb library if libusb-1.0 headers not found Library found might be an older libusb version. Closes #158 Former-commit-id: 12783e1cfd3902954a9513ca1baf53433add742a --- cmake/Findlibusb-1.0.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/Findlibusb-1.0.cmake b/cmake/Findlibusb-1.0.cmake index 26a82c4f..77474e9a 100644 --- a/cmake/Findlibusb-1.0.cmake +++ b/cmake/Findlibusb-1.0.cmake @@ -87,6 +87,7 @@ else (LIBUSB_1_LIBRARIES AND LIBUSB_1_INCLUDE_DIRS) message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}") endif (NOT libusb_1_FIND_QUIETLY) else (LIBUSB_1_FOUND) + unset(LIBUSB_1_LIBRARY CACHE) if (libusb_1_FIND_REQUIRED) message(FATAL_ERROR "Could not find libusb") endif (libusb_1_FIND_REQUIRED)