diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e4d33dccc..296c3584d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -749,19 +749,19 @@ if(ENABLE_SDL) endif() 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() - set(LIBUSB_FOUND true) + 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() + set(LIBUSB_FOUND true) endif() set(SFML_REQD_VERSION 2.1)