-
Notifications
You must be signed in to change notification settings - Fork 14
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
Try to find missing gfx-drivers with CMake #72 #94
Conversation
This commit brings an extra library check in CMakeLists.txt related to mir graphics drivers desktop. A hardcoded known-library-list was introduced and used with find_library. Also, the build output informs the user of the missing libraries. Fixes miracle-wm-org#72
I decided to raise the warning to a normal status, since you might be interested in building without graphics involved. Another mention, I allowed the libraries detected to be saved as a cmake cache variable. I made this decision since it might be good insight for future bug reports(!?). I'll leave the rest to you! |
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.
Awesome stuff @spongythecake ! I just have two questions for future-proofing this thing. You can also check CI to see it working 😄
foreach(lib_name ${MIR_GRAPHICAL_DESKTOP_DRIVERS}) | ||
find_library(${lib_name}_LIBRARY | ||
${lib_name} | ||
PATH /usr/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu/mir/server-platform |
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.
Do we need to provide the whole path here? Would cmaek not look in the regular LD_LIBRARY_PATHS
for us?
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.
And the path would be wrong on non-Debian platforms anyway.
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.
This is true. Busybox would be alienated. But you could also watch the Cmake targets to decide this. A further debt to implement for this issue
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.
So would Fedora and everyone else. Only Debian and Ubuntu use that path model.
It might make sense to have Mir export CMake config modules for the platforms instead, because this is likely to be quite brittle. |
What would this look like? A bunch of |
Well, maybe add a custom pkgconfig variable to the mirserver pc file? |
@Conan-Kudo Ah I see what you mean better now. Perhaps something like this does belong in the Mir project now that I've thought about it. Mir already provides some facilities for find package. It would be really nice if it also provided some facilities to find the platform packages as well. I will make a ticket over there |
Sorry for all the back and forth @spongythecake ! I believe @Conan-Kudo is right here after thinking about it. I opened up this bug in Mir: canonical/mir#3352 I'll be curious to hear what the rest of the team would think about this before acting on it, but it seems to be a good solution to fix miracle-wm any any other Mir-based compositor that runs into this issue in the future. |
I want miracle-wm to be the best it can! I also appreciated the updates. |
Closing this since we've got that ticket made in Mir ;) But thanks for bringing that issue to light! |
This commit brings an extra library check in CMakeLists.txt related to mir graphics drivers desktop. A hardcoded known-library-list was introduced and used with find_library. Also, the build output informs the user of the missing libraries. Fixes #72