| Age | Commit message (Collapse) | Author |
|
|
|
The sample output for the example failed to jibe with reality
in several ways:
- 'prefix' was not included in the inputs, so it isn't displayed
- Boolean values are printed lowercase ('true', not 'True')
- The array formatting would be properly aligned
|
|
This commit adds a closing backtick to the mention of
`configure_file()`, that way it shows up correctly as
preformatted
|
|
|
|
This can come in handy for instance when a custom target creates both
headers and sources. Slicing the output of a `to_list()` call provides
convenient access to just the headers or just the sources.
|
|
|
|
Since commit 44ce04537 ("cargo: Add library API version into its name", 2025-10-28),
the target names provided by cargo subprojects have a suffix corresponding to the
library API; for example, the target that used to be "gtk4" is now "gtk4+0_10".
This however is an implementation detail, and the change broke rust_dependency_maps
that expected to use the crate name.
While the target name is preferrable, and will work great when Meson is able
to create dependency maps by itself (as is the case for the Cargo interpreter),
preserve the old behavior by checking also the entry corresponding to the result
of _get_rust_crate_name.
Reported-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Give a practical example of how it is used.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Give an user opportunities to mangle a custom short name for a DLL on
OS/2.
|
|
In case of python and especially in the case of pyInstaller
where the python command is meson.exe runpython, it should
not be full path to be used but cmd_array.
Fixing #13834
|
|
Place the build products in a directory of the specified name
somewhere within the build directory. This allows use of the target
that includes a specific directory name:
#include <subdir/configure.h>
This also allows creating targets with the same basename by using
different subdirectory names.
v2:
Move build_subdir to Target class.
Error if path separator in build_dir
v3:
Rename to 'build_subdir' to make it clear that the name is
appended to a meson-specific build directory, and does not
provide the user with a way to define the overall meson build
hierarchy.
Allow build_subdir to include path separators.
Support 'build_subdir' for configure_file.
build_subdir must not exist in the source directory and
must not contain '..'
Add documentation and tests
v4:
Rebase and prepare for version 1.9.1
Add failing test case when build_subdir is present in the
project.
Add release note snippet
v5:
Clarify wording on restrictions on the value of build_subdir. Use
the same wording in each place this restriction is described.
v6:
Move path validation to shared function, validate_build_subdir,
instead of duplicating the tests in two places.
v7:
Update version numbers to 1.10.0
Add TypedDict updates.
Remove spurious build_subdir instance variable
v8:
Oops, missed one version number update.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Defining public API in a cross platform library is painful, especially
on Windows. Since every library have to define pretty much the same
macros, better do it in Meson.
|
|
Cuda, for example, doesn't use `prefer_static`, and will always link
statically unless the static value is explicitly set to `true`. This
updates the documentation to reflect that.
|
|
This reverts https://github.com/mesonbuild/meson/pull/15107
Explicit objections regarding the design were raised and not answered,
so it shouldn't have been merged. It needs to be discussed and
revisited.
|
|
|
|
This includes cleaning up some of the type handling to account for
cleanups that are done at the DSL level.
|
|
|
|
|
|
|
|
Fixes: #2296
Fixes: #4481
Fixes: #5968
|
|
Same as the previous, but for VAPI
|
|
This allows targets that don't link with a vala target to rely on the
header generation.
|
|
Which have existed for a *long* time, but are only documented in the
Vala docs.
|
|
|
|
|
|
Analogous to keys(), this returns the values in an array. It uses the
same sorting as keys(), else it would quite confusing to return values
in a different order than the corresponding keys.
|
|
As we are becoming more popular, the docs have to be clearer because
we're being exposed to a wider base of users with highly variable
English language ability. Some of those can be helped with
translations, but for the rest, let's repeat ourselves.
Fixes https://github.com/mesonbuild/meson/issues/14843
|
|
When arrays were added they were called arrays. Because the are
implemented with Python lists, that language started leaking into
talking about Meson types. This is confusing. I've attempted, as much as
possible, to move to using one name, array. I picked array because 1)
It's the original name used, and 2) what Meson has are more properly
arrays as they have a fixed length, while a critical property of lists
are the ability to link and unlink them.
There are a couple of places where the list language has leaked into the
names of keyword arguments. I have not made any attempt to change those,
I don't know if it's that useful or not.
|
|
This allows users to do two things, flatten potentially nested arrays
themselves, and, to safely convert types that may be an array to not an
array.
```meson
x = [meson.get_external_property('may_be_array)].flatten()
```
```meson
x = ['a', ['b', 'c']]
assert(x.flatten() == ['a', 'b', 'c'])
```
|
|
|
|
Fixes: #14788
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
By setting android_exe_type to `application`, the executable gets
actually built as a shared library instead of an executable. This makes
it possible to use an application within an android application process.
mesonbuild#13758
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/7555/
|
|
|
|
|
|
Fixes: #4893
|
|
Which were added in Meson 1.2, but don't have entires in the reference
manual.
|
|
Previously, the documentation said that the CPU name might be amd64,
but in fact x86_64 (AMD64) machines are detected as x86_64 in both
cpu() and cpu_family() during native builds. Reference:
https://buildd.debian.org/status/fetch.php?pkg=libglvnd&arch=amd64&ver=1.7.0-1%2Bb1&stamp=1714222481&raw=0
Instead, mention the only common case for more-specific CPU names
other than 32-bit x86, namely 32-bit ARM. On Debian's autobuilders
(which are running 32-bit user-space on a 64-bit-capable CPU),
native builds genuinely do present as `armv8l`:
https://buildd.debian.org/status/fetch.php?pkg=libglvnd&arch=armhf&ver=1.7.0-1%2Bb1&stamp=1714223924&raw=0
On other machines, they might be some older CPU functionality level.
At the time of writing, cpu() *can* return amd64 when using
`meson env2mfile` on Debian systems, but I think that's a bug in
env2mfile (#13742).
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
|
|
|
|
This commit harmonizes the handling of `d_import_dirs` and
`include_directories`. The treatment of `d_import_dirs` was also
different depending on the context: in `declare_dependency` it was
treated like the `include_directories`, but in `build_target` et al,
it had special treatment. With this commit, they are all treated
by the same function. The documentation has been updated to
reflect this.
Fixes #12742
|
|
|
|
Although it's not especially common, there are certainly cases where it's
useful to pass the path to an external program to a test program.
Fixes: https://github.com/mesonbuild/meson/issues/3552
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
|
|
The example incorrectly uses `then` after the if condition, which is
incorrect meson syntax as meson does not support a `then` keyword.
|
|
Ref https://github.com/mesonbuild/meson/pull/9603
|
|
It's subjective but I think that breaking the sentences in this way
makes them easier to follow.
|
|
|
|
This reverts commit 9f02d0a3e5a5ffc82256391c244b1af38e41ef78.
It turns out that this does introduce a behavioral change in existing
users of ConfigurationData, which it wasn't supposed to (it was supposed
to preserve behavior there, and add a new *warning* for
EnvironmentVariables).
This breaks projects such as pulseaudio, libvirt, and probably more.
Roll back the change and try again after 1.5.0 is released.
Fixes: #13372
|
|
When trying to get the version of a program, meson was previously
hardcoded to run the binary with `--version`. This does work with the
vast majority of programs, but there are a few outliers (e.g. ffmpeg)
which have an unusual argument for printing out the version. Support
these programs by introducing a version_argument kwarg in find_program
which allows users to override `--version` with whatever the custom
argument for printing the version may be for the program.
|
|
@PLAINNAME@ and @BASENAME@ cannot be used in custom_target()
with multiple inputs. For those, similar macros are needed
with an index.
Fixes #13164
|