我正在尝试为arm交叉编译libftdi。当我运行 Cmake 时,我得到:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBUSB_INCLUDE_DIR (ADVANCED)
Run Code Online (Sandbox Code Playgroud)
我知道 LIBUSB_INCLUDE_DIR 应该在 libftdi 根目录中的 FindUSB1.cmake 中设置。但是,我不知道如何使 FindUSB1.cmake 找到我已编译并放入 /opt/lib 的 libusb。这是默认文件:
# - Try to find the freetype library
# Once done this defines
#
# LIBUSB_FOUND - system has libusb
# LIBUSB_INCLUDE_DIR - the libusb include directory
# LIBUSB_LIBRARIES - Link …Run Code Online (Sandbox Code Playgroud)