• Home
  • Raw
  • Download

Lines Matching full:meson

1 Compilation and Installation Using Meson
7 For general information about Meson see the `Meson
10 **Mesa's Meson build system is generally considered stable and ready for
15 Mesa requires Meson >= 0.52.0 to build.
19 <https://mesonbuild.com/Getting-meson.html>`__ to install the
20 current version of Meson.
22 The Meson build of Mesa is tested on Linux, macOS, Windows, Cygwin,
28 If Meson is not already installed on your system, you can typically
33 sudo apt-get install meson # Ubuntu
39 sudo dnf install meson # Fedora
41 Some older versions of Meson do not check that they are too old and will
51 You will need to install Python 3 and Meson as a module using pip. This
53 modules (Mako). You also need pkg-config (a hard dependency of Meson),
68 Then install Meson using pip
72 py -3 -m pip install meson mako
75 Meson.
80 The Meson program is used to configure the source directory and
85 Meson only supports out-of-tree builds, and must be passed a directory
95 meson build/
98 you can install them, or try to remove the dependency with a Meson
101 To review the options which Meson chose, run:
105 meson configure build/
107 Meson does not currently support listing configuration options before
108 running "meson build/" but this feature is being discussed upstream. For
109 now, we have a ``bin/meson-options.py`` script that prints the options
115 With additional arguments ``meson configure`` can be used to change
121 meson configure build/ -Dprefix=/tmp/install -Dglx=true
129 Once you've run the initial ``meson`` command successfully you can use
153 Meson with these it to open a shell. For clang-cl you will need to open
160 ``--backend=vs`` to Meson will generate a Visual Studio solution. If you
161 want to use ICL or clang-cl with the vsbackend you will need Meson
170 Meson default to installing libGL.so in your system's main lib/
179 meson --prefix="${PWD}/build/install" build/
185 Meson also honors ``DESTDIR`` for installs.
190 Meson supports the common CFLAGS, CXXFLAGS, etc. environment variables
202 meson builddir/ -Dc_args=-fmax-errors=10 -Dcpp_args=-DMAGIC=123
207 Meson supports the standard CC and CXX environment variables for
208 changing the default compiler. Note that Meson does not allow changing
217 CC=clang CXX=clang++ meson build-clang
220 meson configure build -Dc_args="-Wno-typedef-redefinition"
223 The default compilers depends on your operating system. Meson supports
230 Meson includes upstream logic to wrap llvm-config using its standard
233 As of Meson 0.51.0 Meson can use CMake to find LLVM (the CMake finder
234 was added in Meson 0.49.0, but LLVM cannot be found until 0.51) Due to
237 ``-Dcmake_module_path`` option in this Meson version, which points to
242 meson builddir -Dcmake_module_path=/home/user/mycmake/prefix
244 As of Meson 0.49.0 Meson also has the concept of a `"native
257 Then configure Meson:
261 meson builddir/ --native-file custom-llvm.ini
263 Meson < 0.49 doesn't support native files, so to specify a custom
270 PATH=/path/to/folder/with/llvm-config:$PATH meson build
287 Then configure Meson:
291 meson builddir/ --cross-file cross-llvm.ini
297 either undesirable or impossible. Meson's solution for this is a
303 - Add a meson.build file to that directory (more on that later)
317 such a meson.build file might look like:
323 cpp = meson.get_compiler('cpp')
326 _search = join_paths(meson.current_source_dir(), 'lib')
376 One of the oddities of Meson is that some options are different when
377 passed to the ``meson`` than to ``meson configure``. These options are
378 passed as --option=foo to ``meson``, but -Doption=foo to
379 ``meson configure``. Mesa defined options are always passed as
388 Note that in Meson this defaults to ``debugoptimized``, and not
394 ``plain`` buildtype, which causes Meson to inject no additional
399 This option controls assertions in Meson projects. When set to
409 `Meson supports
412 this file to ``meson`` or ``meson configure`` with the ``--cross-file``
416 (without the folder path) if you put it in $XDG_DATA_HOME/meson/cross or
417 ~/.local/share/meson/cross
425 - `meson-cross-x86-linux-gnu <https://aur.archlinux.org/packages/meson-cross-x86-linux-gnu>`__
426 - `meson-cross-aarch64-linux-gnu <https://aur.archlinux.org/packages/meson-cross-aarch64-linux-gnu…