Skip to content

chore: upgrade hidapi library to version 0.15#40

Open
creativeprojects wants to merge 2 commits intomauer:mainfrom
creativeprojects:main
Open

chore: upgrade hidapi library to version 0.15#40
creativeprojects wants to merge 2 commits intomauer:mainfrom
creativeprojects:main

Conversation

@creativeprojects
Copy link
Copy Markdown

Why this PR?

I tried to compile the project on my mac:
With the latest version of cmake from home-brew (cmake version 4.2.3) I wasn't able to compile the project with this error:

% cmake -G Ninja ..
CMake Deprecation Warning at CMakeLists.txt:19 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-----------------------------------------------
-- Configure XMidiCtrl 1.14.beta-1
-----------------------------------------------
-- Creating version file
-- Configuring build scripts for toml11
CMake Deprecation Warning at external/toml11/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- Configuring build scripts for fmt
-- Version: 10.1.1
-- Build type:
-- Configuring build scripts for fonts
-- Configuring build scripts for RtMidi
-- Checking for module 'jack'
--   Package 'jack' not found
-- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR)
-- Compiling with support for: coremidi
CMake Error at external/hidapi/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

What is this PR doing?

  • upgraded hidapi library from 0.14 to 0.15
  • upgraded minimum required version of cmake

Testing

  • happily running on my mac with a few hours of flight in x-plane 12.4
  • not tested on windows/linux (don't have an x-plane license for those)

Copilot AI review requested due to automatic review settings March 16, 2026 18:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR vendors an updated hidapi (0.15.0) into the project to address build issues with newer CMake versions and to pick up upstream backend improvements across Windows/macOS/Linux/*BSD.

Changes:

  • Upgrade vendored external/hidapi to 0.15.0, including new/updated public APIs (e.g., output report sending and read-error reporting).
  • Update HIDAPI build/test assets (Windows descriptor reconstruction tests + new fixture data).
  • Adjust CMake/autotools metadata/workflows inside the vendored HIDAPI tree.

Reviewed changes

Copilot reviewed 42 out of 45 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
CMakeLists.txt Changes the top-level CMake minimum version.
external/hidapi/windows/test/hid_report_reconstructor_test.c Updates MinGW formatting handling and parsing formats for indices.
external/hidapi/windows/test/data/1532_00A3_0002_0001_real.rpt_desc Adds new Windows test fixture input descriptor dump.
external/hidapi/windows/test/data/1532_00A3_0002_0001_expected.rpt_desc Adds expected reconstructed descriptor for new fixture.
external/hidapi/windows/test/data/1532_00A3_0002_0001.pp_data Adds pp_data dump fixture for reconstruction tests.
external/hidapi/windows/test/data/045E_02FF_0005_0001_expected.rpt_desc Updates expected output descriptor to match new reconstruction behavior.
external/hidapi/windows/test/CMakeLists.txt Registers the new Windows reconstruction test case.
external/hidapi/windows/pp_data_dump/pp_data_dump.c Updates pp_data dump formatting and MinGW handling.
external/hidapi/windows/hidapi_winapi.h Adds WinAPI write-timeout API and clarifies doc naming.
external/hidapi/windows/hidapi_hidsdi.h Extends HID DDI function typedefs (SetOutputReport).
external/hidapi/windows/hidapi_hidclass.h Adds missing IOCTL macro definitions for broader SDK compatibility.
external/hidapi/windows/hidapi_descriptor_reconstruct.h Updates descriptor reconstruction structures and adds layout assertion.
external/hidapi/windows/hidapi_descriptor_reconstruct.c Refactors reconstruction implementation and padding logic.
external/hidapi/windows/hid.c Implements new APIs and improves string/timeout/error handling.
external/hidapi/udev/69-hid.rules Fixes a typo in rule comments.
external/hidapi/testgui/copy_to_bundle.sh Adds bundle-copy helper script for macOS TestGUI.
external/hidapi/subprojects/hidapi_build_cmake/CMakeLists.txt Updates CMake policy range syntax.
external/hidapi/src/CMakeLists.txt Adds NetBSD backend wiring and conditional install logic.
external/hidapi/pc/hidapi-netbsd.pc.in Adds pkg-config template for NetBSD backend.
external/hidapi/netbsd/hid.c Adds new NetBSD UHID backend implementation.
external/hidapi/netbsd/README.md Documents NetBSD backend design/constraints.
external/hidapi/netbsd/CMakeLists.txt Adds NetBSD backend CMake target and install logic.
external/hidapi/mac/hid.c Improves barrier implementation, error handling, and adds read-error API.
external/hidapi/mac/Makefile-manual Removes AppKit dependency from manual build.
external/hidapi/mac/CMakeLists.txt Removes AppKit, updates compatibility version logic, updates CMake range.
external/hidapi/linux/hid.c Adds output-report ioctl support, read-error tracking, and robustness fixes.
external/hidapi/linux/CMakeLists.txt Updates CMake version range.
external/hidapi/libusb/hidapi_thread_pthread.h Introduces a thread abstraction header for pthread-based backends.
external/hidapi/libusb/hid.c Refactors threading, enumeration, and adds output-report support hooks.
external/hidapi/libusb/CMakeLists.txt Updates CMake range and fixes a typo in comments.
external/hidapi/hidtest/test.c Updates test app to use new APIs and improved error output.
external/hidapi/hidtest/CMakeLists.txt Updates CMake version range.
external/hidapi/hidapi/hidapi.h Bumps HIDAPI minor version and adds/updates API docs and declarations.
external/hidapi/dist/hidapi.podspec Removes AppKit dependency from CocoaPods spec.
external/hidapi/configure.ac Removes AppKit dependency from autotools config.
external/hidapi/bootstrap Adds bootstrap helper for autotools regeneration.
external/hidapi/VERSION Updates version to 0.15.0.
external/hidapi/README.md Updates CI badges/links.
external/hidapi/CMakeLists.txt Updates CMake range and adds NetBSD option.
external/hidapi/BUILD.cmake.md Updates documentation (typos + updated min CMake example + target alias name).
external/hidapi/BUILD.autotools.md Updates autotools build instructions (out-of-source build).
external/hidapi/AUTHORS.txt Fixes typo in maintenance wording.
external/hidapi/.github/workflows/docs.yaml Updates GitHub Actions runners/actions and Doxygen installation approach.
external/hidapi/.github/workflows/checks.yml Updates GitHub Actions runners/actions and package installation steps.
external/hidapi/.github/workflows/builds.yml Updates CI flags, adds ClangCL job, and refreshes runners/actions and scripts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread external/hidapi/windows/hidapi_descriptor_reconstruct.h
Comment thread external/hidapi/windows/hidapi_descriptor_reconstruct.h
Comment thread external/hidapi/libusb/hid.c
Comment thread external/hidapi/windows/test/hid_report_reconstructor_test.c
Comment thread CMakeLists.txt Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants