Dont require pkgconfig if libusb is already given

This commit is contained in:
Carl Philipp Klemm 2025-10-02 15:22:08 +02:00
parent b5c80de536
commit b46dd80af3

View file

@ -2,11 +2,11 @@ cmake_minimum_required(VERSION 3.16)
project(eismultiplexer C)
find_package(PkgConfig REQUIRED)
find_package(Doxygen)
if(NOT LIBUSB_INCLUDE_DIRS OR NOT LIBUSB_LIBRARIES)
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBUSB libusb-1.0)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")