Skip to content
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

[build.zig] X11 only system fail builds by default #4216

Closed
wants to merge 3 commits into from

Conversation

lnc3l0t
Copy link
Contributor

@lnc3l0t lnc3l0t commented Aug 6, 2024

I added a check to find the program wayland-scanner, if it's not found the following error log is printed and the build fails:

 Wayland may not be installed on the system.
 You can switch to X11 in your `build.zig` by changing `Options.linux_display_backend`

lnc3l0t added 3 commits July 29, 2024 10:08
The new Options field "config" holds a string the user can set in the
format "-Dflag_a=1 -Dflag_b=0 ..." to override the values set in
`config.h`.
The file is parsed and the default values are appended to the
compilation flags, if the user doesn't override them.
The user string is appended to the compilation flags.
The "-DEXTERNAL_CONFIG_FLAGS" is added to prevent "config.h" inclusion.

Note: a certain format is assumed for the formatting of config.h
Note: this commit references the closed issue raysan5#3516
Lines from `config.h` which contains "SUPPORT" are added to compilation after being parsed:
- remove whitespace
- format to preprocessor option https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html

The user supplied flags have priority over the ones read from the file.

NOTE: extension to commit 4da7f82, the logic is simplified
because the SUPPORT flags only have binary values, which makes them easier to parse.
f867598 introduced a default value
for linux_display_backend, which makes X11 only systems fail to build.
@lnc3l0t lnc3l0t closed this Aug 6, 2024
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.

1 participant