Files
eden/CMakeModules/find/Findlibusb.cmake
crueter ed4bb5bf86 [cmake] Simplify DetectPlatform and normalize platform names
Since 3.25 introduced `LINUX`, standard everything to that style. It
also introduced BSD so use that.

Signed-off-by: crueter <crueter@eden-emu.dev>
2026-07-09 06:52:36 +02:00

24 lines
626 B
CMake

# SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2022 Alexandre Bouvier <contact@amb.tf>
#
# SPDX-License-Identifier: GPL-3.0-or-later
find_package(PkgConfig QUIET)
pkg_search_module(LIBUSB QUIET IMPORTED_TARGET libusb-1.0)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libusb
REQUIRED_VARS LIBUSB_LINK_LIBRARIES
VERSION_VAR LIBUSB_VERSION
)
if (MSYS2)
FixMsysPath(PkgConfig::LIBUSB)
endif()
if (libusb_FOUND AND NOT TARGET libusb::usb)
add_library(libusb::usb ALIAS PkgConfig::LIBUSB)
endif()