aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules/FindLIBUSB.cmake
diff options
context:
space:
mode:
authorMichael Dickens <michael.dickens@ettus.com>2021-06-25 15:41:57 -0400
committerMartin Braun <martin@gnuradio.org>2021-07-06 04:29:55 -0700
commitd922ad3d61abd8e0cfbcbf76a800093e6ba838b3 (patch)
treec19431bf2a7589d40d42f86794908fe4c4cfe5cc /host/cmake/Modules/FindLIBUSB.cmake
parentc1c05e94b61eb4e6935bfb14ddc338afae9d96d1 (diff)
downloaduhd-d922ad3d61abd8e0cfbcbf76a800093e6ba838b3.tar.gz
uhd-d922ad3d61abd8e0cfbcbf76a800093e6ba838b3.tar.bz2
uhd-d922ad3d61abd8e0cfbcbf76a800093e6ba838b3.zip
cmake: correctly set and unset any CMAKE_REQUIRED variables
Diffstat (limited to 'host/cmake/Modules/FindLIBUSB.cmake')
-rw-r--r--host/cmake/Modules/FindLIBUSB.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/host/cmake/Modules/FindLIBUSB.cmake b/host/cmake/Modules/FindLIBUSB.cmake
index 9c404f68e..f574df916 100644
--- a/host/cmake/Modules/FindLIBUSB.cmake
+++ b/host/cmake/Modules/FindLIBUSB.cmake
@@ -57,6 +57,9 @@ if(HAVE_LIBUSB_STRERROR)
list(APPEND LIBUSB_DEFINITIONS "HAVE_LIBUSB_STRERROR=1")
endif(HAVE_LIBUSB_STRERROR)
+unset(CMAKE_REQUIRED_INCLUDES)
+unset(CMAKE_REQUIRED_LIBRARIES)
+
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS)
mark_as_advanced(LIBUSB_INCLUDE_DIRS LIBUSB_LIBRARIES)