Skip to content

[ci] [macOS] Fix hidapi include directories on macOS#669

Merged
ten9876 merged 1 commit into
aethersdr:mainfrom
jensenpat:codex/hidapi-include-fix
Apr 4, 2026
Merged

[ci] [macOS] Fix hidapi include directories on macOS#669
ten9876 merged 1 commit into
aethersdr:mainfrom
jensenpat:codex/hidapi-include-fix

Conversation

@jensenpat

@jensenpat jensenpat commented Apr 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

This fixes a macOS build failure when hidapi is discovered via pkg-config from Homebrew.

Problem

On this machine, -I/opt/homebrew/Cellar/hidapi/0.15.0/include/hidapi returns an include path ending in include/hidapi.

The source includes headers as hidapi/hidapi.h, which means the compiler also needs the parent include directory.

Without that, latest main fails during compilation of hidapi-enabled sources such as HidEncoderManager.

Fix

When CMake discovers hidapi include directories, normalize them by keeping the original include dirs and additionally appending the parent directory when a discovered include dir itself ends in and contains hidapi.h.

This preserves existing behavior for other platforms and layouts while fixing the Homebrew case.

This solves issue #658.

Validation

  • reproduced the failure on macOS with latest main
  • configured successfully after the CMake change
  • full ninja: no work to do. completed successfully
  • verified hidapi-gated sources compiled, including HidEncoderManager and StreamDeck sources

@jensenpat jensenpat marked this pull request as ready for review April 4, 2026 15:32
@jensenpat jensenpat changed the title Normalize hidapi include directories Fix hidapi include directories on macOS Apr 4, 2026
@ten9876 ten9876 enabled auto-merge (squash) April 4, 2026 16:34
@ten9876 ten9876 merged commit ebb7d34 into aethersdr:main Apr 4, 2026
3 checks passed
@jensenpat jensenpat deleted the codex/hidapi-include-fix branch April 4, 2026 17:42
@jensenpat jensenpat changed the title Fix hidapi include directories on macOS [ci] [macOS] Fix hidapi include directories on macOS Apr 8, 2026
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