diff options
author | Dudemanguy <random342@airmail.cc> | 2022-08-12 19:25:50 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2022-08-15 14:14:44 +0000 |
commit | f295d39f5c76c3bbcc4bd916aa4041e092f6e427 (patch) | |
tree | 70d897f4a64a704f25e91d02d82077f8ed75153e /DOCS/compatibility.rst | |
parent | 7c4f03e82ac17b929b6a4e9527e274f50b4bc2e4 (diff) | |
download | mpv-f295d39f5c76c3bbcc4bd916aa4041e092f6e427.tar.bz2 mpv-f295d39f5c76c3bbcc4bd916aa4041e092f6e427.tar.xz |
meson: refactor generating config.h
mpv has a ton of defines that are generated during building. Previously,
the meson build just had this as a big giant wall of text that manually
set each one but we can do this smarter. Instead, change the "features"
object to a dictionary and have it hold the name of the feature and its
value (true/false on whether it is enabled). Then at the end, just loop
through it and reformat the name of the feature so it becomes
HAVE_FEATURE. A side effect of this is that a lot of extra defines are
generated that aren't actually used in the code, but the waf build
worked like this for years anyway. A nice result of this is that the use
of foo['use'] internally can be completely eliminated and replaced with
feature['foo'] instead when needed.
Diffstat (limited to 'DOCS/compatibility.rst')
0 files changed, 0 insertions, 0 deletions