This is important so people can not trick Meson to select a
subproject_dir that is not in the project's source directory.
It also ensures a string is used for the path.
The previous change disallowed any subdirectories for subproject dirs,
and therefore broke a couple of projects making use of that.
This change still prevents people from setting subproject dirs that are
not in the project's source tree, while allowing to specify any path
within the project's directory again.
Resolves: #2719
If a dep is not found on the system and a fallback is specified, we
have two cases:
1. Look for the dependency in a pre-initialized subproject
2. Initialize the subproject and look for the dependency
Both these require version comparing, ensuring the fetched variable
is a dependency, and printing a success message, erroring out, etc.
Now we share the relevant code instead of duplicating it. It already
diverged, so this is a good thing.
As a side-effect, we now log fallback dependencies in the same format
as system dependencies:
Dependency libva found: YES
Dependency libva found: YES (cached)
Dependency glib-2.0 from subproject subprojects/glib found: YES
Dependency glib-2.0 from subproject subprojects/glib found: YES (cached)
See issue #2762
Adds full_version to class Compiler. If set full_version will be printed
additionally.
Added support for CCompiler and CPPCompiler
Added support for gcc/g++, clang/clang++, icc.
pkg-config enables to define variables by using the define-variable
option. This allows some packages to redefine relative paths, so
files can be installed in the same relative paths but under prefix.
Check if the keyword arguments given to dependency are permitted, as is
done with other functions already.
The list of permitted keyword arguments is taken from the documentation.
Mesa has 4 build systems currently, set our version in a file called
VERSION, and read that in to each build system to simplify the release
process. For meson this is accomplished by using run_command within the
project() function declaration itself, and with meson <= 0.43.0 this
works fine. Commit 1b0048a702 makes
scripts that are run through run_command a rebuild dependency, but the
attribute used to store that information is set after the project()
command is processed. This breaks mesa.
The solution is to set that list before calling parse_project.
Fixes#2597
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.
subproject using wrap-file is broken since commit (68bd64c Prevent
projects from directly grabbing files from other subprojects. )
subproject with wrap-file usually have version number after name
- **sproj_name** is `zlib-1.2.8` according to `directory = zlib-1.2.8`
of zlib.wrap
- but **self.subproject** `zlib`
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
We were adding built files to the list of source files to check for
regen. We were also not adding sources files to regen when `command:`
was used.
Fixes#1865
This method accepts a single function that takes no arguments and
returns a single value which can be a value that can be cast to
a 64-bit signed integer, or a string, and returns that value.
Mostly useful for running foolib_version() functions that return the
currently-available version of libraries.