diff options
| author | 2022-12-31 14:23:38 +0100 | |
|---|---|---|
| committer | 2023-01-02 18:22:07 +0100 | |
| commit | eceee8c3d930563e26841d556f9acb965eab67c8 (patch) | |
| tree | c17a3f5362f35d7ffbcc46c881f1b656e71db81b /CMakeModules/Findlibusb.cmake | |
| parent | Merge pull request #9541 from abouvier/cmake-option (diff) | |
| download | yuzu-eceee8c3d930563e26841d556f9acb965eab67c8.tar.gz yuzu-eceee8c3d930563e26841d556f9acb965eab67c8.tar.xz yuzu-eceee8c3d930563e26841d556f9acb965eab67c8.zip | |
cmake: move find-modules to root cmake dir
Diffstat (limited to 'CMakeModules/Findlibusb.cmake')
| -rw-r--r-- | CMakeModules/Findlibusb.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeModules/Findlibusb.cmake b/CMakeModules/Findlibusb.cmake new file mode 100644 index 000000000..0eadce957 --- /dev/null +++ b/CMakeModules/Findlibusb.cmake | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | # SPDX-FileCopyrightText: 2022 Alexandre Bouvier <contact@amb.tf> | ||
| 2 | # | ||
| 3 | # SPDX-License-Identifier: GPL-3.0-or-later | ||
| 4 | |||
| 5 | find_package(PkgConfig QUIET) | ||
| 6 | pkg_search_module(LIBUSB QUIET IMPORTED_TARGET libusb-1.0) | ||
| 7 | |||
| 8 | include(FindPackageHandleStandardArgs) | ||
| 9 | find_package_handle_standard_args(libusb | ||
| 10 | REQUIRED_VARS LIBUSB_LINK_LIBRARIES | ||
| 11 | VERSION_VAR LIBUSB_VERSION | ||
| 12 | ) | ||
| 13 | |||
| 14 | if (libusb_FOUND AND NOT TARGET libusb::usb) | ||
| 15 | add_library(libusb::usb ALIAS PkgConfig::LIBUSB) | ||
| 16 | endif() | ||