1#  Copyright (C) 2017 Patrick Griffis
2#  Copyright (C) 2018 Codethink Ltd.
3#
4#  This program is free software; you can redistribute it and/or
5#  modify it under the terms of the GNU Lesser General Public
6#  License as published by the Free Software Foundation; either
7#  version 2 of the License, or (at your option) any later version.
8#
9#  This library is distributed in the hope that it will be useful,
10#  but WITHOUT ANY WARRANTY; without even the implied warranty of
11#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
12#  Lesser General Public License for more details.
13#
14#  You should have received a copy of the GNU Lesser General Public
15#  License along with this library. If not, see <http://www.gnu.org/licenses/>.
16
17"""
18meson - Meson build element
19===========================
20This is a :mod:`BuildElement <buildstream.buildelement>` implementation for
21using `Meson <http://mesonbuild.com/>`_ build scripts.
22
23You will often want to pass additional arguments to ``meson``. This should
24be done on a per-element basis by setting the ``meson-local`` variable.  Here is
25an example:
26
27.. code:: yaml
28
29   variables:
30     meson-local: |
31       -Dmonkeys=yes
32
33If you want to pass extra options to ``meson`` for every element in your
34project, set the ``meson-global`` variable in your project.conf file. Here is
35an example of that:
36
37.. code:: yaml
38
39   elements:
40     meson:
41       variables:
42         meson-global: |
43           -Dmonkeys=always
44
45Here is the default configuration for the ``meson`` element in full:
46
47  .. literalinclude:: ../../../buildstream/plugins/elements/meson.yaml
48     :language: yaml
49"""
50
51from buildstream import BuildElement
52
53
54# Element implementation for the 'meson' kind.
55class MesonElement(BuildElement):
56    pass
57
58
59# Plugin entry point
60def setup():
61    return MesonElement
62