The install_dir parameter of the libraries can also contain the
prefix path, which creates wrong library paths in the .pc file.
This patch detects if prefix is contained in the library path
and creates a relative path.
Fixes#2469
This patch sets the --name option for files processed with
rcc. It generates an additional initialization function,
which can be used with static linking.
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Currently, run_target does not get namespaced for each subproject,
unlike executable and others. This means that two subprojects sharing
the same run_target name cause meson to crash.
Fix this by moving the subproject namespacing logic from the BuildTarget
class to the Target class.
This commit adds support for an additional `moc_extra_arguments` keyword.
It becomes especially handy, when `moc`-ed sources conditionally provide
`slots`, depending on compile time macros (i.e. defines).
Without specifying a custom install directory string, get_custom_install_dir() returns True. So for the `Libs` entry I was getting this:
Libs: -L${prefix}/True -lfoo
Now it behaves as expected:
Libs: -L${libdir} -lfoo
This allows a CustomTarget to be indexed, and the resulting indexed
value (a CustomTargetIndex type), to be used as a source in other
targets. This will confer a dependency on the original target, but only
inserts the source file returning by index the original target's
outputs. This can allow a CustomTarget that creates both a header and a
code file to have it's outputs split, for example.
Fixes#1470
This also adds a "# noqa: F401" comment on an unused "import lzma",
which we are using it in a try/except block that is being used to
check if the lzma module is importable; of course it is unused.
v2: This turned out to be a little tricky.
mesonbuild/modules/__init__.py had the "unused" import:
from ..interpreterbase import permittedKwargs, noKwargs
However, that meant that the various modules could do things like:
from . import noKwargs # "." is "mesonbuild.modules"
Which breaks when you remove __init__.py's "unused" import. I
could have tagged that import with "# noqa: F401", but instead I
chose to have each of the module import directly from
"..interpreterbase" instead of ".".
Add new 'docbook' argument which generates Docbook documentation for
each D-Bus interface. The docbook argument will be used as prefix
in `PREFIX`-NAME.xml pattern, and NAME will be replaced by the D-Bus
interfaces.
If we don't do that, the traversal of the sources list to generate the
sources file for g-ir-scanner is going to explode with a Python
backtrace like this one:
File "/usr/lib/python3.5/site-packages/mesonbuild/modules/gnome.py", line 463, in generate_gir
gir_filelist.write(os.path.join(srcdir, s) + '\n')
File "/usr/lib/python3.5/posixpath.py", line 89, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/lib/python3.5/genericpath.py", line 143, in _check_arg_types
(funcname, s.__class__.__name__)) from None
if the sources list contains a list.
On Windows, one will face the issue of the 8192-character limit for each
command line, so this will cause an issue when one is building items
like GTK+ with introspection, because the g-ir-scanner command line will
likely get too long, which will clearly break the build. This will
affect all Windows builds.
Make use of the --filelist option that is already in g-ir-scanner, and
generate such a file list from the sources that are fed to
generate_gir(), named as
$(builddir)/$(target_id)/<NameSpace>_<NameSpaceVersion>_gir_filelist
and using it during the build.
Include 'platbase' for stripping the prefix for 'platlib' and 'platinclude'.
This is necessary for installing platform-dependant Python modules such as GI overrides.
99% of all mkenums uses in C libraries use the same basic template,
so add a mkenums_simple() function that takes care of everything for
us based on that template.
Features:
- optional function declaration decorator such as GLIB_AVAILABLE
- optional extra header prefix (e.g. for include needed for decorator)
- optional extra body prefix (e.g. for additional includes)
- optional function name prefix (e.g. to add leading underscores)
Fixes issue #1384
gnome.compile_resources() was not parsing custom target sources
properly. It was using the custom target name as the output of the
custom target instead of looking at the list of outputs.
Also modify the GNOME framework test to expose this.