aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
AgeCommit message (Collapse)AuthorFilesLines
2018-06-18generate_gir: Add all the files provided by the CustomTargetCorentin Noël1-3/+4
2018-06-17gtkdoc: Run gtkdoc-scangobj command from build directoryXavier Claessens1-0/+2
All paths in CFLAGS are relative to build_root, so current directory must be there we invoking gtkdoc-scangobj. Closes: #3379
2018-06-08gdbus_codegen: Support --c-generate-autocleanupRobert Ancell1-2/+7
2018-06-07gdbus_codegen: Support arbitrary extra argumentsRobert Ancell1-1/+4
2018-06-06Fix issues found by flake8Xavier Claessens1-1/+0
2018-06-06Move <lang>_args to coredata.compiler_optionsXavier Claessens1-4/+4
2018-06-01Add 0.46.0 featuresSalamandar1-0/+1
2018-06-01Add 0.42.0 featuresSalamandar1-0/+1
2018-06-01Add 0.40.0 featuresSalamandar1-0/+3
2018-06-01Add 0.37.0 featuresSalamandar1-1/+3
2018-05-23gnome/mkenums: allow passing generated files as templatesMathieu Duponchelle1-2/+6
2018-05-09gdbus_codegen: Guess the output list for docbook generationNirbheek Chauhan1-1/+5
We were setting it to a file list that would always be wrong, and always out of date since it would never exist. However, the output list is not predictable. It usually has a 1-1 relationship with the input XML files, but it may not. This must be fixed later with API for users to provide the output names. See: https://github.com/mesonbuild/meson/pull/3539
2018-05-09gtkdoc: Fix typo that made xml_files an array of arraysNirbheek Chauhan1-1/+1
2018-05-06gnome.gtkdoc: Allow passing file objects as xml_filesNirbheek Chauhan1-4/+6
If we pass a source files() object, we will look for it in the build directory, which is wrong. If we pass a build files() object (from configure_file()), we will find it in the build directory, and then try to copy it on top of itself in gtkdochelper.py getting a SameFileError. Add a test for it, and also properly iterate custom target outputs when adding to content files.
2018-05-05gnome: Use the header basename for #include in mkenums_simpleNirbheek Chauhan1-1/+1
Otherwise, when you use a File target, the value will be the full path to the header from the build root, which is not what anyone wants.
2018-05-05gnome: Update minimum glib version for gdbus-codegenNirbheek Chauhan1-3/+2
The fix has landed upstream, and will be in the next glib stable release. I have verified that it fixes the problem described in #3488 and that the 'frameworks/7 gnome' test passes now.
2018-05-04gnome: Disable usage of new --body and --header argsNirbheek Chauhan1-4/+6
The new --body and --header args are broken because they do not allow the use of --output-directory to set the correct `#include "foo.h"` line in `foo.c`. The changes in the gdbus test case show this. Disabled till this can be fixed in glib. Closes https://github.com/mesonbuild/meson/issues/3488
2018-04-28Install generated gdbus header with old glib version too.Jussi Pakkanen1-1/+5
2018-04-21gnome: If pkg-config is not found, assume glib is 2.54 (#3443)Nirbheek Chauhan1-2/+7
* gnome: If pkg-config is not found, assume glib is 2.0 Checking the pkg-config file to confirm tool versions is a hack, and should eventually be replaced with checking the actual versions of the tools. * gnome: Actually assume glib version is 2.54 if not found It is actually not possible to build most projects with the GNOME module if your glib is older, particularly genmarshal and gdbus-codegen generate unusable output without newer arguments that were added for Meson.
2018-04-20gnome: gdbus-codegen add a `sources:` kwargNirbheek Chauhan1-8/+10
It accepts multiple XML files, not just one. For example, glib uses it that way.
2018-04-18gdbus_codegen: Fix install_dir parameterIñigo Martínez1-1/+1
The `install` parameter that is present in the `permittedKwargs` annotation is wrong. The correct parameter name, which is also consistent with the rest of functions in the `gnome` module, is `install_dir`.
2018-04-15find_program: Don't spam when called from a moduleNirbheek Chauhan1-9/+9
The user doesn't need to know whether or not the program was found, especially not when it's spammed for every gnome.foo() function
2018-04-15Updated all modules to work with the new API.Jussi Pakkanen1-2/+2
2018-04-15Convert Gnome module to use find_program from interpreter.Jussi Pakkanen1-15/+15
2018-04-12gdbus_codegen: Fix new generated objectsIñigo Martínez1-1/+4
The `ct` variable used in the ModuleReturnValue is created only for versions earlier than 2.55.2. However, in newer versions that variable does not exist.
2018-04-12gdbus_codegen: Fix custom target nameIñigo Martínez1-3/+4
The namebase which is used as the target name, also holds part of the file names. This used in combination generates files with wrong names.
2018-04-11gdbus_codegen: Return 2 targets when docbook is disabledNirbheek Chauhan1-8/+11
Also document this behaviour, test it, and fix the return value from the module -- we create one target and return it thrice to the build file
2018-04-11gnome: Validate docbook parameter is a stringIñigo Martínez1-2/+10
The `docbook` parameter used in `gdbus_codegen` should contain the prefix string in `PREFIX-NAME.xml`. Therefore it has to be validated as a string.
2018-04-11gnome: Split header and code targets in gdbus_codegen()Iñigo Martínez1-17/+54
The development version of `glib` (2.55.2) has acquired support for generating gdbus header and source code files separately. This allows dependencies to be more fine grained on those targets depending only on the header.
2018-04-09Never install the glib-mkenums generated C source (#3374)Emmanuele Bassi1-0/+6
* Never install the glib-mkenums generated C source When using gnome.mkenums_simple() we end up installing the generated C source file alongside the C header file, if `install_header` is set to True. This is caused by mkenums_simple() acting as a wrapper for mkenums() without template files; mkenums() won't be able to know if we're generating the header or the source, and will use the presence of `install_header` as the deciding factor as to whether the generated file should be installed. When generating the C source file, we should always unset the `install_header` option to False, just like mkenums() expects. Closes #3373 * Verify that mkenums_simple() does not install C sources When asked to installed the generated C header file.
2018-04-04gnome.gtkdoc: Fix generated files used as content filesIñigo Martínez1-1/+1
The `gtkdoc` function in the `gnome` module is able to use generated files as content files, but the path to these is wrong in the used command line.
2018-03-06Add link_whole argument to declare_dependency()Aleksey Filippov1-1/+1
2018-02-20gnome: Fix depend_files listing for compile_resourcesNirbheek Chauhan1-21/+19
Also add a unit test that will test all codepaths for old Glib tools versions. Closes https://github.com/mesonbuild/meson/issues/2860
2018-02-08Add get_pkgconfig_variable(default:)Jon Turney1-2/+2
Also use that to squelch the warning for internal uses which handle the variable missing case (just gnome at the moment) A follow up to PR #2914
2018-01-07gnome: Always use an ordered set to store LDFLAGSTing-Wei Lan1-1/+1
The order of -L flags in LDFLAGS is critical to the build. Any unexpected reordering can cause undefined reference error when linking.
2018-01-07gnome.generate_gir: Pass *FLAGS set in the environment to g-ir-scannerTing-Wei Lan1-0/+6
The reason for this change is the same as the previous commit. Although g-ir-scanner can pick arguments from CFLAGS, CPPFLAGS, LDFLAGS environment variables by itself, it is still better for build systems to put them on the command line instead of relying on users to setup the same environment. Since g-ir-scanner doesn't provide a way to set arbitrary linker flags on the command line, arguments in LDFLAGS that are not started with -L are not passed.
2018-01-07gnome.gtkdoc: Pass *FLAGS set in the environment to gtkdoc-scangobjTing-Wei Lan1-0/+2
GLib-based libraries and applications require gettext library to compile and link. On non-GNU systems such as FreeBSD, gettext is not included in libc and it is required to pass '-L/usr/local/lib -lintl' to the linker to satisfy the dependency on gettext. The pkg-config file provided by GLib already has '-lintl', but users still have to remember to put '-L/usr/local/lib' into LDFLAGS. If we don't pass LDFLAGS to gtkdoc-scangobj, the linker will not be able to find '-lintl' when no dependencies of the project provides '-L/usr/local/lib'. Since all *FLAGS are commonly used in many build systems, this commit adds support for not only LDFLAGS but also CFLAGS and CPPFLAGS. Fixes #1724
2017-12-22gnome.gtkdoc: Add dependencies over generated targetsIñigo Martínez1-2/+8
The gtkdoc function can also use generated targets to create documentation. However, the dependencies over these generated files are missing, so these must be also included in the run target.
2017-12-19gnome.gtkdoc: Add support for non string based content filesIñigo Martínez1-1/+22
gnome's gtkdoc function does not support content files which are not strings. However, there are situations where files generated by other targets might be needed.
2017-12-13Enable re-compilation of GNOME gschema files if they have changed.Michael James Gratton1-1/+1
* mesonbuild/modules/gnome.py (GnomeModule.compile_schemas): Allow the depend_files kwarg. * docs/markdown/Gnome-module.md: Add docs for new kwarg (and the only other one that is permitted).
2017-12-03Merge pull request #2663 from inigomartinez/pkg-config-define-variableJussi Pakkanen1-2/+2
dependencies: Allow pkg-config to define variables
2017-12-01dependencies: Fix pkg-config variable definitionIñigo Martínez1-2/+2
In a previous commit variable definition was added in pkg-config. However, this commit was not complete. This fixes the missing parts of that commit.
2017-11-30gnome.compile_resources: Prefer generated files over source filesNirbheek Chauhan1-23/+15
We should always prefer generated files over onces in the source tree else if the same file also exists in the source tree we get strange behaviour where we ignore dependencies and the project has to be built twice to be fully up-to-date. See: https://bugzilla.gnome.org/show_bug.cgi?id=787677 Closes https://github.com/mesonbuild/meson/issues/2686
2017-11-29gnome.gtkdoc: Fix missing permitted kwargsPatrick Griffis1-1/+2
Found by https://bugzilla.gnome.org/show_bug.cgi?id=790998
2017-11-10gnome: Add include_directories parameter to gtkdoc()Xavier Claessens1-1/+1
2017-10-31namespace run_targets by subprojectMartin Kelly1-13/+13
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.
2017-10-25gnome: Fix compile_schemas() using path sep in target namePatrick Griffis1-1/+1
2017-10-18Allow to give source files to GtkDoc by respecting the File classCorentin Noël1-1/+1
2017-10-08gnome: g-ir-scanner accepts multiple symbol-prefix argumentsRico Tzschichholz1-4/+2
2017-10-02Merge pull request #2375 from centricular/gnome-gir-fixesJussi Pakkanen1-9/+7
Fix GNOME gir generation with lists of dependency lists