Commit Graph

72 Commits

Author SHA1 Message Date
Thibault Saunier 9c0997dafd gnome: Use g-ir-scanner --extra-library option when avalaible
When generating the .gir file we need g-ir-scanner to link the
introspector binary against the right dependencies, for that
we used to use the --library option but this has a special meaning
and the libs passed in there end up being the ones in the .gir file
itself, which is not what we want.

A new --extra-library option is beeing added in goject-introspection
(https://bugzilla.gnome.org/show_bug.cgi?id=774625) to handle our use case
(ie. not using libtool which allows g-ir-scanner to know about those)
and we should make use of it.

Closes #981
2016-12-03 23:07:00 +02:00
Jussi Pakkanen 8e8f75005d Merge pull request #1076 from mesonbuild/tingping/gresource-export
gnome.compile_resources(): Add export and install_header kwargs
2016-12-03 22:59:27 +02:00
Thibault Saunier e933bdd872 gnome: Properly search for programs
Otherwise it might just fail on windows and this way
we report a proper error message when not found.
2016-12-02 23:01:19 +02:00
Patrick Griffis 9a6db2eb2f gnome.compile_resources(): Add export and install_header kwargs
This defaults to not exporting resources as that is generally what
you want but that does make this a breaking change. Along with that
if you export your resources you would want to install the header.
2016-11-20 17:39:57 -05:00
Patrick Griffis 8dd32506f4 gnome.compile_resources(): Add ability to output gresource bundles
Closes #1061
2016-11-20 23:36:21 +01:00
Patrick Griffis 587a0bb3d1 gnome: Update required version for glib-compile-resources depfile fixes
Note that this version is not yet released
2016-11-20 23:01:26 +01:00
Jussi Pakkanen a01919976e Always specify installed data with a File object. Closes #858. 2016-11-18 17:37:35 -05:00
Elliott Sales de Andrade 996f4d89f3 Disallow some keyword arguments to gnome.mkenums.
The install argument is allowed for CustomTargets, but we use
install_header as the setting now. Also, setting a generic template when
specifying the more specific source or header template shouldn't be
allowed.
2016-11-18 15:30:56 -05:00
Jussi Pakkanen 8b05990c13 Disable gresource dependency generation as it breaks Ninja. 2016-11-14 11:43:24 -05:00
Jussi Pakkanen 59a414283c Merge pull request #1022 from centricular/fix-girtarget-deps-includes
gnome.generate_gir: Add gir deps and includes recursively
2016-11-12 18:01:28 -05:00
Jussi Pakkanen e1ecb95d1d Merged generate_gir fix. 2016-11-13 00:43:06 +02:00
Thibault Saunier 85a0cd7635 Add new add_project_[link]_args functions
Fixes 979
2016-11-12 17:34:06 -05:00
Nirbheek Chauhan 69dcbb6ec9 gnome.generate_gir: Add gir deps and includes recursively
Earlier, we were never adding dependencies on other GirTargets that we
need. The dependency would only be added indirectly through other
BuildTargets such as SharedLibrary. Now we add all GirTargets specified
in the `dependencies :` kwarg to the list of dependencies of the
GirTarget that we generate.

Also, we weren't adding include directories for the typelib generation
command recursively. We were only adding it for the GirTargets listed
under the `dependencies :` kwarg to gnome.generate_gir. Now we search
all link targets, find GirTargets, extract the include dir, and use it.

In summation, dependencies were completely broken.
2016-11-13 03:57:58 +05:30
Patrick Griffis c7226462a2 gnome: Improve dependency handling of compile_resources()
- Use depfile support on recent glib-compile-resources
- Don't pass dep files to header ever
- Pass depends for generated deps
- Avoid duplicate --sourcedir args
- Include correct subdir of generated deps
2016-11-09 17:40:42 +01:00
Nirbheek Chauhan a2262103fb Implement mlog.warning and use it everywhere for warnings
Prepends the string with 'WARNING:' in ANSI yellow.

Closes https://github.com/mesonbuild/meson/issues/961
2016-11-08 17:43:24 -05:00
Patrick Griffis fb7d9c7aef gnome: Mark helper functions as private 2016-11-06 00:02:53 -04:00
Matthew Waters b6971f2007 gnome: make generate_gir use the correct shared library
If building in a prefix with a version of the library that's already
installed with other dependencies already installed in that prefix,
then the installed library was being picked up to link with
for gir generation instead of the newly built library.
2016-11-04 01:35:29 +11:00
Jussi Pakkanen f1c909c41a Merge pull request #980 from ebassi/gtkdoc-fixes
Improvements for gnome.gtkdoc
2016-11-02 13:49:05 -07:00
Jussi Pakkanen 36a0d162cb Merge pull request #895 from mesonbuild/wip/tingping/gnome-vapi
gnome: Add generate_vapi function
2016-11-02 11:41:58 -07:00
Emmanuele Bassi e226d702bc gtkdoc: Add `ignore_headers` positional argument
Not all headers are public, or contain public types. GTK-Doc allows
adding headers to be ignored during the "scan" phase, by passing the
`--ignore-headers` command line argument to gtkdoc-scan.

Currently, you can do something like:

  ignored_headers = [ 'foo-private.h', 'bar-private.h', ]

  gnome.gtkdoc(...
               scan_args: [
                 '--ignore-headers=' + ' '.join(ignored_headers),
               ],
               ...)

But it does not guarantee escaping rules and it's definitely not nice.

We can add a simpler version of that mechanism through a new positional
argument, `ignore_headers`, which behaves like `content_files` or
`html_assets`, and takes an array of header files to ignore:

  gnome.gtkdoc(...
               ignore_headers: ignored_headers,
               ...)
2016-11-01 14:11:48 +00:00
Jussi Pakkanen 3c48bd2d88 Revert d9473095f2 because it broke GStreamer. 2016-10-24 12:16:28 -07:00
Patrick Griffis d9473095f2 gnome: Don't pass ldflags to g-ir-scanner
In this context -l refers to shared libraries that the gir
provides so you end up with a dozen unecessary libs in your
gir file.
2016-10-23 08:53:27 -07:00
Jussi Pakkanen b50f3e6976 Merge pull request #934 from mesonbuild/wip/tingping/gnome-yelp
gnome: Add yelp() function
2016-10-23 04:39:15 -07:00
Patrick Griffis ed3cc537cb gnome: Fix building gobject-introspection with sanitizer
Fixes #922
2016-10-22 15:04:16 -07:00
Patrick Griffis bae7d7b3d7 gnome: Add generate_vapi() function
This allows C projects to generate vapi bindings from
gir files and returns a dependency that can be used by
Vala.
2016-10-21 02:23:54 -04:00
Patrick Griffis 1781129740 gnome: Add yelp() function
Fixes #881
Mentioned in #295
2016-10-19 18:44:19 -04:00
Jussi Pakkanen e908910187 Can query pkg-config variables from the system. Closes #726. 2016-10-19 22:36:34 +03:00
Patrick Griffis 22debf6ffc gnome: Fix gresource warning incorrectly being shown on 2.50+ 2016-10-19 21:15:05 +03:00
Jussi Pakkanen a417efdf24 Merge pull request #793 from ssssam/sam/gresource-dependencies
gnome: allow use of generated files with compile_resources()
2016-10-16 17:47:39 +03:00
Patrick Griffis d7fdeb4d15 gnome: Avoid unhandled exception 2016-10-16 17:38:54 +03:00
Sam Thursfield 25f13067c2 gnome: allow use of generated files with compile_resources()
This commit adds a 'dependencies' keyword to the
gnome.compile_resources() function, which allows your resource blob
to depend on files generated at build-time from custom_target() or
configure_file() targets.

My current use case for this is source data that gets processed with Gettext
translation tools before being compiled into the resource blob.

This feature only works with GLib version 2.48.2 and above. So the
compile_resources() function now detects GLib version and raises an
error if the version of GLib being used is too old.

The compile_resources() test case is now split into two, so that the
existing one can continue to run on systems with old GLib versions (such
as Ubuntu Xenial, which the automated tests on travisci.org use), but
where new enough GLib is available we also test generating gresource
content.

The existing warning about glib-compile-resources is now only printed
if GLib version is older than 2.50.0 because
<https://bugzilla.gnome.org/show_bug.cgi?id=745754> is fixed in the
2.50.0 release.
2016-10-13 21:18:14 +01:00
Patrick Griffis 94b7b59546 gnome.generate_gir(): Also include current build dir
Continuation of 084b854ce0
2016-10-08 12:34:30 +02:00
Jussi Pakkanen f73c0a1098 Merge pull request #843 from mesonbuild/tingping/gir-dir
gnome.generate_gir(): Fix install_dir and add install_dir_gir and install_dir_typelib
2016-10-03 21:27:54 +03:00
Jussi Pakkanen 7256e109bf Merge pull request #718 from QuLogic/glib-mkenums-genmarshal
glib-mkenums and glib-genmarshal support
2016-10-03 19:07:42 +03:00
Patrick Griffis dd9dfa77fb gnome.generate_gir(): Add install_dir_gir and install_dir_typelib
A generic `install_dir` is less useful and didn't work so just ignore it
2016-10-03 02:34:33 -04:00
Patrick Griffis 084b854ce0 gnome: Consistently include current source dir
This is a common pattern so avoid the duplication
2016-10-02 12:16:22 -04:00
Elliott Sales de Andrade 2840539a08 Don't overwrite mkenums C file dependencies. 2016-09-28 18:32:56 -04:00
Elliott Sales de Andrade 8f024c0697 Allow running mkenums without templates. 2016-09-28 18:32:46 -04:00
Jussi Pakkanen d61b71fdc2 Converted mkenums to be single invocation. 2016-09-28 18:21:42 -04:00
Elliott Sales de Andrade 1033728c85 Fix mkenums and genmarshal argument names.
Dashes aren't allowed in keyword argument names.
2016-09-28 18:20:18 -04:00
Elliott Sales de Andrade ceee8bc6b2 Generate genmarshal header and body simultaneously.
This follows the same style as gnome.compile_resources, which produces
both files from one invocation.
2016-09-28 18:20:18 -04:00
Elliott Sales de Andrade 2a8a0727fc Add support for glib-genmarshal to gnome module. 2016-09-28 18:20:18 -04:00
Elliott Sales de Andrade ab004ab189 Add support for glib-mkenums to gnome module. 2016-09-28 18:20:17 -04:00
Thibault Saunier bb3823e6f4 gnome: Allow specifying gtkdoc where to install directory 2016-09-26 15:25:59 -03:00
Thibault Saunier f86fbf6ebf gnome: Run gtkdoc-scanobjs and add a way to get assets working
Allowing the object tree to be generated.

We need to add options to allow copying the ncesseary sources and
assets so the HTML generator can work with them (everything is
relative so we need to copy them in the build directory).

Until now the documentation was not generated from the user provided
main sgml file but it was using a generated one, which lead to a broken
documentation. Starting using it revealed the other bugs fixed in that
commit.
2016-09-26 15:25:59 -03:00
Thibault Saunier 68ae8e1ad0 gnome: Factor out a get_dependencies_flags method
And recurse to make sure that we build against all internal
dependencies dependencies.
2016-09-26 15:25:59 -03:00
Thibault Saunier 52a4b3302e gnome: Make all include paths absolute
The relative computation was broken when using
subprojects.
2016-09-26 15:25:59 -03:00
Jussi Pakkanen 8ab62a27b4 Merge pull request #739 from QuLogic/gir-include-paths
Update GIR include paths
2016-09-26 20:56:02 +03:00
TingPing 5b34e560e5 gnome: Print useful error if missing compile_resource arg (#811) 2016-09-25 19:02:41 +03:00
Elliott Sales de Andrade 28e1f3ba13 Fix pkgconfig libraries passed to GIR targets. 2016-09-14 16:59:53 -04:00