This works for `moc_*` and `ui_files`, but it never could have worked
for `qresources` due to the implementation assuming a `str` or `File`.
To restore previous compatibility I've added `CustomTarget` where it
would have worked, but not where it would have failed, the former would
raised an exception along the lines anyway.
Fixes#9007
g-ir-scanner does not convert relative -L paths to runtime paths which
are added to -Wl,-rpath and LD_LIBRARY_PATH / DYLD_LIBRARY_PATH
/ PATH. This means that the local library will either not be found at
runtime (while building introspection data), or the system-wide
library will be picked instead.
See: giscanner/ccompiler.py:get_internal_link_flags() in
gobject-introspection for more details.
These were spotted by mypy and pyright. One is a string where a Path is
expected, another other is a possibly unbound variable, and the third is
bound but unused variables.
Including not calling back into `Interpreter.func_*`, which is not a
good idea both from a type saftey and perforamance point of view.
Instead there's now a shared _impl method
This is useful both from the perspective of optional functionality that
requires a module, and also as I continue to progress with Meson++,
which will probably not implement all of the modules that Meson itself
does.
`qt.preprocess` dispatches to the individual methods instead of
duplicating all of the logic itself, but this means that it goes through
the type checking, and feature checking a second time. To avoid this we
need to use a private helper method instead.
Fixes#8920
This commit introduces a new type of `HoldableObject`: The
`SecondLevelHolder`. The primary purpose of this class is
to handle cases where two (or more) `HoldableObject`s are
stored at the same time (with one default object). The
best (and currently only) example here is the `BothLibraries`
class.
mesonbuild.dependencies.__init__ exposes configtool, pkgconfig, cmake
and more in __init__.py, so there's no reason we should be tying
SystemDependency to the internal organization implementation of the
subpackage!
In the 2nd previous commit it took quite some effort to figure out that
the python module "does not exist" because of import errors while
refactoring something completely different.
For qt we already have all of the necissary checking in place. Now in
the interpreter we have the same, the intrperter does all of the
checking, then passed the arguments to the Generator initializer, which
just assigns the passed values. This is nice, neat, and clean and fixes
the layering violatino between build and interpreter.
This adds a number of missing type annotations to existing functions,
and makes a few members protected instead of public, as they were never
meant to be public