cmake: General improvements to libusb linking

Delegates libusb external communication to externals/CMakeLists.txt
Ensures an interface library `usb` for every pathway
input_common just links to the `usb` library now
externals/libusb/CMakeLists.txt sets variables to override SDL2's libusb
finding
Other minor cleanup
This commit is contained in:
lat9nq 2021-06-03 03:49:35 -04:00
parent 55dd027115
commit ddc47e6df8
4 changed files with 31 additions and 17 deletions

View file

@ -45,6 +45,11 @@ target_include_directories(microprofile INTERFACE ./microprofile)
add_library(unicorn-headers INTERFACE)
target_include_directories(unicorn-headers INTERFACE ./unicorn/include)
# libusb
if (NOT LIBUSB_FOUND OR YUZU_USE_BUNDLED_LIBUSB)
add_subdirectory(libusb)
endif()
# SDL2
if (NOT SDL2_FOUND AND ENABLE_SDL2)
if (NOT WIN32)