Questions tagged [meson-build]

Meson is a build configuration system used to build C/C++, Java, Rust, Objective-C/C++, and Fortran projects. It uses a DSL to describe project targets. This tag is for questions about the meson build system and DSL syntax or usage.

Meson is a build configuration system used to build C/C++, Java, Rust, Objective-C/C++, and Fortran.

It is conceptually similar to MPC or CMake, and draws strengths from them as well as SCons, Autoconf.

Project targets are described using a non-Turing complete DSL. Despite being implemented in Python, no direct calls into Python are permitted, nor is any Python syntax directly supported. Strictly speaking, the Meson processor could be reimplemented in any language and would be able to handle the DSL without assistance from an embedded Python interpreter.

For more information about Meson, see their home page. To contribute, see their source code repository on github.com.

469 questions
2
votes
2 answers

How can I concatenate multiple files into one in Meson?

I'm having trouble with a basic task in Meson where I need multiple files concatenated into one during build; basically: cat *.txt > compiled.txt or cat foo.txt bar.txt baz.txt > compiled.txt However whether I use custom_target(), generator() or…
andy.holmes
  • 3,383
  • 17
  • 28
2
votes
1 answer

Setting compiler right for meson

I am trying to build a basic Qt Application with the Meson Build System on my Mac (using macOS Sierra), following the tutorial on http://mesonbuild.com/samples.html. My meson.build file looks like this: project('qt5 demo', 'cpp', default_options…
Jiddoo
  • 1,091
  • 2
  • 9
  • 14
2
votes
1 answer

Problems using Qt with meson on Mac

I stumbled across the build system meson ( http://mesonbuild.com/ ) which attracted me due to its simplicity and native Qt support. However, when I followed the tutorial I got the error message Build type: native build Project name: qt5 demo Native…
Jiddoo
  • 1,091
  • 2
  • 9
  • 14
2
votes
1 answer

Running Specific Test for Meson Build

With meson build, if I have multiple tests defined in the meson.build, like shown here, is it possible to build and run a specific single test? Lets say I am working on a specific module and would like to run just the test for that module using…
user1135541
  • 1,781
  • 3
  • 19
  • 41
2
votes
1 answer

How to handle conditional cflags with meson?

I'm new to meson, just looking through the documentation at this point. What is your recommended way of handling conditional cflags in a meson build? Say for Visual Studio I want to use /DNOMINMAX and a suppress a bunch of warnings only VS produces…
oz10
  • 153,307
  • 27
  • 93
  • 128
1
vote
0 answers

Upgrading native recipe (meson) version in custom layer in Yocto

My project uses a old distribution of poky where the meson version is 0.44.1. My objective is to upgrade this distribution of meson, without changing anything on the static poky layer. So I created a new meson_0.53.1.bb file located inside…
hao123
  • 381
  • 2
  • 6
  • 21
1
vote
0 answers

Copy a folder to the build directory with meson

I have a resource folder that needs to be copied to the build directory in a project using Meson build. I was using a custom_target like this: demo_res = custom_target('demo-res', input: ['demo/res/materials.yml'], output: ['res'], …
Kagetsuki
  • 309
  • 2
  • 18
1
vote
0 answers

How can I install and import a shared library using the Meson Build system and Vala?

The Problem I am currently studying app development with Vala using GTK and Libadwaita. As there are patterns I will need in many of my apps, I want to create a shared library. So I created a library and installed it via meson install. The…
user20364506
1
vote
0 answers

Can't build meson GuiTutorial

I am following the meson build GuiTutorial from here: https://mesonbuild.com/GuiTutorial.html I am running Visual Studio 2019 express and python version 3.9.0 installed separately (that is not the one that comes with msys). I am using the x64 Native…
1
vote
1 answer

Install "recordlinkage" module on Windows

I'm trying to use pip install recordlinkage to install the recordlinkage library. Till now this command has worked for all other modules I've downloaded like pandas, arrow, etc. However, I started getting a series of errors since I ran pip install…
1
vote
0 answers

What's the equivalent to patsubst in meson?

When I need to turn a list of input files to a list of output files in a makefile I'd do something like this: input := file_a.ts file_b.ts file_c.ts output := $(input:.ts=.js) How would I do this in meson? I tried using the '@BASENAME@' syntax…
ea7ababe
  • 373
  • 5
  • 13
1
vote
0 answers

Get the path of a found library in meson

In Meson, you get an opaque dependency object when you search for a library. How do you get the full path of the library that was found? In other words, what goes in "????" below? compiler = meson.get_compiler('cpp') extraLibDep =…
Matt Young
  • 21
  • 3
1
vote
0 answers

How can I compile(generate a .sln file or something similar) a project via meson

I have the following problem: enter image description here G:\Programs\Soft\Coding\C\VisualStudio\Coders\rellume>meson build The Meson build system Version: 1.0.0 Source dir: G:\Programs\Soft\Coding\C\VisualStudio\Coders\rellume Build dir:…
OSPFv3
  • 33
  • 5
1
vote
0 answers

Converting a meson.build library to CMakeLists

So, one of my uni courses uses a meson.build system for one of the libraries we have to use. The library is organized like this Now, using CLion, I have trouble linking to that library. Earlier I have been trying cloning it, and setting…
Gronnmann
  • 13
  • 4
1
vote
0 answers

Run code or set environment variable before meson cross-compile setup is run

I'm cross compiling to WASM using emscripten using meson and the cross file I have currently looks like this: [binaries] c = 'emcc' cpp = 'em++' ar = 'emar' ranlib = 'emranlib' pkgconfig = 'pkg-config' strip = 'strip' [project options] sharedlib =…
Kagetsuki
  • 309
  • 2
  • 18