From eb4d980d2f5a3527106cf3ec5c15ac94cb0db4ec Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Wed, 28 Sep 2016 13:32:17 -0400 Subject: [PATCH] Ignore LIBUSB_FOUND on Apple It shouldn't be set in the first place, and its cached value is screwing up the buildbots. --- CMakeLists.txt | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93b60ee113..89fbd4971b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -738,18 +738,20 @@ if(ENABLE_SDL) endif(SDL2_FOUND) endif() -if(NOT APPLE) - find_package(LibUSB) +if(NOT ANDROID) + add_definitions(-D__LIBUSB__) + if(NOT APPLE) + find_package(LibUSB) + endif() + if(LIBUSB_FOUND AND NOT APPLE) + message("Using shared LibUSB") + include_directories(${LIBUSB_INCLUDE_DIR}) + else() + message("Using static LibUSB from Externals") + add_subdirectory(Externals/libusb) + set(LIBUSB_LIBRARIES usb) + endif() endif() -add_definitions(-D__LIBUSB__) -if(LIBUSB_FOUND) - message("Using shared LibUSB") - include_directories(${LIBUSB_INCLUDE_DIR}) -else() - message("Using static LibUSB from Externals") - add_subdirectory(Externals/libusb) - set(LIBUSB_LIBRARIES usb) -endif(LIBUSB_FOUND) set(SFML_REQD_VERSION 2.1) if(NOT APPLE)