-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
miniscule fix for building on systems where the hardcoded path to libdrm headers doesn't exist #3387
miniscule fix for building on systems where the hardcoded path to libdrm headers doesn't exist #3387
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3387 +/- ##
==========================================
- Coverage 77.52% 77.52% -0.01%
==========================================
Files 1065 1065
Lines 67901 67901
==========================================
- Hits 52639 52638 -1
- Misses 15262 15263 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
This information should be available in pkgconfig, right? I think it would be a better idea to pull it from there (as that's where the compiler will pull it from) - I'm not sure if CMake's find_path
will match the pkgconfig behaviour, and things could get weird if those don't match.
Oh, I totally missed that there is a similar variable already set by pkg_check_modules. find_path(DRM_FOURCC_INCLUDE_DIR NAMES "drm_fourcc.h" PATH_SUFFIXES "libdrm" "" HINTS ${DRM_INCLUDE_DIRS}) which is kind of redundant, but I guess it doesn't hurt either. |
3a28937
to
be9edd1
Compare
Fixed up and rebuilt and briefly tested. There was a third occurrence of the hardcoded path there that I had missed which apparently didn't cause any build or runtime failure on my computer, but left the DRM_MODIFIERS_FILE incomplete, that's also been taken into account now. |
Thanks for the ping! This fell off my plate when travelling to the recent sprint, the week-long sprint, and then the travel back 😉 I've tweaked the |
Yep that still builds and runs on nix. Good call, because otherwise the find_* functions first look in all of the paths in one of the CMAKE_* environment variables set by nix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignoring paranoid thoughts like "what if DRM_FOURCC_INCLUDE_DIR
includes spaces?" this looks reasonable.
, e.g. NixOS.
I hope this still works on other systems.