Commit Graph

320 Commits

Author SHA1 Message Date
Jussi Pakkanen dd3f49af0d
Merge pull request #2757 from xclaesse/pkgconfig
pkgconfig: Allow passing Dependency objects to library(_private)
2017-12-31 19:11:57 +02:00
Iñigo Martínez f022cb3a40 gnome.gtkdoc: Add dependencies over generated targets
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-22 20:58:13 +01:00
Xavier Claessens 68eedc8b71 pkgconfig: Rename DepsHolder to DependenciesHelper 2017-12-21 16:45:36 -05:00
Xavier Claessens 49977686b5 pkgconfig: Use the pc file we generated for libraries 2017-12-20 19:09:08 -05:00
Xavier Claessens 9e541a0fff pkgconfig: Avoid duplicated -L flags 2017-12-20 19:09:08 -05:00
Xavier Claessens 1c0570906c pkgconfig: Allow passing Dependency objects to library(_private)
Special case ThreadDependency by taking compiler's flags and
PkgConfigDependency by adding them in requires(.private) instead. For
other Dependency objects just take their link_args and compile_args.

Closes #2725
2017-12-20 19:09:08 -05:00
Iñigo Martínez f92d117bec gnome.gtkdoc: Add support for non string based content files
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-19 17:45:58 +01:00
Michael James Gratton 93c988b453 Enable re-compilation of GNOME gschema files if they have changed.
* 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-13 21:31:32 +02:00
Jussi Pakkanen 018deb48fe
Merge pull request #2663 from inigomartinez/pkg-config-define-variable
dependencies: Allow pkg-config to define variables
2017-12-03 22:53:44 +02:00
Iñigo Martínez 44dd429ee5 dependencies: Fix pkg-config variable definition
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-12-01 13:49:01 +01:00
Nirbheek Chauhan e1bdc098ca gnome.compile_resources: Prefer generated files over source files
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-30 23:15:19 +02:00
Patrick Griffis 643d3a4976 gnome.gtkdoc: Fix missing permitted kwargs
Found by https://bugzilla.gnome.org/show_bug.cgi?id=790998
2017-11-29 12:36:11 -05:00
Alexis Jeandet 120f7a4c40 [Qt module] Added workaround for qt tools version detection
Depending on the tool (moc, uic, rcc, lrelease), the Qt version
(4.8, 5.7, 5.9) and the distribution (Fedora, debian,...) it seems you
cannot predict which of -v or -version will be supported.

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-11-28 22:50:31 +02:00
Jussi Pakkanen 2dab7c37df
Merge pull request #2676 from jeandet/add_qt_translations
Add qt translations
2017-11-26 17:12:47 +02:00
Alexis Jeandet 5c5eac3571 [Qt module] Added translation files compilation method
- Added a new compile_translations method since preprocess was already quite
full and translations compilation is quite different from ui, qrc, cpp files
preprocessing.
- Updated translation.
- Updated test case.

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-11-23 07:09:07 +01:00
Alexis Jeandet 1fd743e6ad [Qt module] Added lrelease detection
Just detect lrelease as done with other Qt tools.
Uses -version instead of -v to probe version since lrelease don't
support it.

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-11-22 23:28:32 +01:00
Alexis Jeandet 5de5e7673f [Qt module] Few minor fixes
- removed a typo in tools detection loop
- added include dir also when parsing cpp sources with moc, not only headers

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-11-22 22:52:38 +01:00
Jussi Pakkanen 9d67e5030b Changed code to use detected executables rather than hardcoding sys.executable. 2017-11-20 23:08:17 +02:00
Iñigo Martínez 638077181a pkgconfig: Handle prefix in library path
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
2017-11-19 18:20:21 +02:00
Jussi Pakkanen e51da1a34d
Merge pull request #2611 from mesonbuild/nirbheek/pkgconfig-msvc-static
Several fixes to pkg-config dependencies and the pkg-config module (try 3)
2017-11-15 22:51:34 +02:00
Jussi Pakkanen 897fd0bd16
Merge pull request #2579 from thillux/master
Qt5-Module: add `name` option to rcc
2017-11-13 21:17:41 +02:00
Nirbheek Chauhan 4fb978e1f7 pkgconfig module: Escape all paths while generating
Without this, we produce unusable pkg-config files when
prefix/libdir/etc contain spaces, which is very common on Windows.
2017-11-11 23:06:49 +05:30
Xavier Claessens 9e2d078948 gnome: Add include_directories parameter to gtkdoc() 2017-11-10 18:23:47 +02:00
Markus Theil 3f8a082a68 Qt-Module: fix name option with multiple rcc files
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
2017-11-08 23:08:53 +01:00
Markus Theil b36475ff44 Qt-Module: fix rcc `name` with Qt4
Qt5's rcc knows --name and -name, Qt4's only -name.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
2017-11-03 18:42:35 +01:00
Markus Theil 51bc364a10 Qt5-Module: add `name` option to rcc
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>
2017-11-03 18:16:51 +01:00
Martin Kelly 02bea7d5bf namespace run_targets by subproject
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-31 01:04:38 +02:00
Leif Middelschulte cf759e529c Fixes the `kwargs` handling.
As suggested by @jeandet.

Details:
https://github.com/mesonbuild/meson/pull/2529#pullrequestreview-72703268
2017-10-29 18:06:38 +01:00
Leif Middelschulte b919e05821 removes unnecessary code as suggested by @jeandet
Details: https://github.com/mesonbuild/meson/pull/2529#discussion_r146985692
2017-10-26 13:06:58 +02:00
Leif Middelschulte 32a8ab40c1 removes unnecessary if/else-statement as suggested by @jeandet
Details: https://github.com/mesonbuild/meson/pull/2529#discussion_r146985692
2017-10-26 12:04:41 +02:00
Leif Middelschulte 050a56ad47 Qt5-Module: Add `moc_extra_arguments` keyword support.
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).
2017-10-25 21:09:16 +02:00
Patrick Griffis f220a5dd86 gnome: Fix compile_schemas() using path sep in target name 2017-10-25 21:01:16 +03:00
Jussi Pakkanen 831a8cff45 Merge pull request #2464 from jeandet/Qt4_Qt5_factorization
Factorized Qt4 and Qt5 modules in one base class.
2017-10-24 23:00:41 +03:00
getzze 6ce42e2ec5 Error for Libs in package_config function
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
2017-10-19 20:22:32 +03:00
Corentin Noël fd860482e5 Allow to give source files to GtkDoc by respecting the File class 2017-10-18 00:39:39 +03:00
Alexis Jeandet 4410c73efa Factorized Qt compilers version probing.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-10-12 08:58:31 +02:00
Alexis Jeandet f7f439caeb Factorized Qt4 and Qt5 modules in one base class.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-10-10 23:03:57 +02:00
Rico Tzschichholz 8b8e1ee620 gnome: g-ir-scanner accepts multiple symbol-prefix arguments 2017-10-08 14:04:34 +03:00
Jussi Pakkanen 357b34f915 Merge pull request #2375 from centricular/gnome-gir-fixes
Fix GNOME gir generation with lists of dependency lists
2017-10-02 00:04:18 +03:00
Patrick Griffis 893d101fff gnome: Add header kwarg to generate_gir()
This is a commonly used flag so lets make it more obvious.
2017-10-01 20:15:21 +03:00
Alexis Jeandet a9258923fa Added include directory argument for Qt's Moc which is needed to build plugins.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-10-01 20:12:25 +03:00
Nirbheek Chauhan bb0e18b738 Use listify and extract_as_list everywhere
They now flatten by default and unhold objects if required

Includes unit tests.
2017-10-01 22:27:48 +05:30
Nirbheek Chauhan 26dada3797 gnome: Flatten and unholder all dependencies
Otherwise lists-of-lists get ignored instead
2017-10-01 12:07:04 +05:30
Dylan Baker dda5e8cadb Allow CustomTarget's to be indexed
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
2017-09-27 22:01:24 +03:00
Jussi Pakkanen be0aa7fd74 Merge pull request #2357 from LukeShu/flake8
Bring into compliance with flake8
2017-09-22 21:33:34 +03:00
Luke Shumaker 4dbbb4884c flake8: Clean up complained-about unused imports
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 ".".
2017-09-21 13:41:03 -04:00
Luke Shumaker bb25260f00 flake8: Perform suggested whitespace/formatting changes
This only touches newlines, spaces, and (occaisionally) commas.  Anything
else is left for another commit.
2017-09-21 11:59:03 -04:00
Corentin Noël 3e6c3ea10c Change ternary to another argument 2017-09-20 20:34:20 +02:00
Corentin Noël 6a2926870c Add 'install' keyword to the gettext macro 2017-09-20 20:17:59 +02:00
Alexis Jeandet e553d0807b Last round with listify function refactoring.
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18 22:25:34 +02:00