-
Notifications
You must be signed in to change notification settings - Fork 1
Handle Meson CMake options compatibility #3
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
base: master
Are you sure you want to change the base?
Handle Meson CMake options compatibility #3
Conversation
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| freetype = disabler() | ||
| if not freetype_opt.disabled() and (client_ui_enabled or freetype_opt.enabled()) | ||
| freetype = dependency('freetype2', required: freetype_opt.enabled()) | ||
|
|
||
| if not freetype.found() and freetype_opt.allowed() |
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.
Allow freetype subproject fallback when feature is enabled
When the build is invoked with -Dfreetype=enabled and the system does not already provide FreeType, the first dependency('freetype2', required: freetype_opt.enabled()) call aborts the configure step before the later block that configures the bundled CMake subproject can run. That makes it impossible to build the optional wrap even though the commit introduces the logic for it. The dependency lookup should remain non‑required and let the explicit error after the fallback handle the "enabled but not found" case so the wrap can satisfy the request.
Useful? React with 👍 / 👎.
| rmlui = disabler() | ||
| if not rmlui_opt.disabled() and (client_ui_enabled or rmlui_opt.enabled()) | ||
| rml_modules = ['RmlUi::RmlUi', 'RmlUi::Controls', 'RmlUi::Debugger'] | ||
| rmlui = dependency('RmlUi', method: 'cmake', modules: rml_modules, required: rmlui_opt.enabled()) | ||
|
|
||
| if not rmlui.found() and rmlui_opt.allowed() |
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.
RmlUi fallback is bypassed when option is forced on
The same pattern appears in the RmlUi block: if the user passes -Drmlui=enabled without a preinstalled RmlUi, dependency('RmlUi', …, required: rmlui_opt.enabled()) fails immediately and the subsequent code that configures the bundled subproject never executes. As a result the feature cannot be enabled via the wrap even though the logic exists. Make the initial dependency optional and rely on the later error('RmlUi support requested…') to reject the configuration after attempting the fallback.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68e662b1b25083288417dbbfdc906491