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
0
votes
1 answer

How to set MACOSX_DEPLOYMENT_TARGET in meson for pango, harfbuzz, glib, etc

I am trying to compile libs for usage on OS X 10.8 and newer. When I am building for example libpng library, I am using this script and it works (resulting library is compatible with OS X 10.8 and newer) export…
Martin
  • 93
  • 7
0
votes
1 answer

How to pass file name as a C++ compile argument to use in meson build?

I need to pass a compiler flag -D__DEBUG_FILE__="src.cpp" to g++ while compiling source file src.cpp. How can I achieve this in meson? I am aware of the cpp_args built-in option, but not able to figure out how to pass the file name in it. I am aware…
Clinten Gomez
  • 148
  • 1
  • 9
0
votes
1 answer

i18n.merge_file can't translate desktop file

I'm trying to convert autotools project to Meson and stuck on translation of desktop file. There is no problem to get all .mo files created. POTFILES and LINGUAS are in 'po' folder as per manual. Only problem is i18n.merge_file is not generating…
0
votes
1 answer

What is the proper way of adding a local dependency (openCV) in Meson?

I am using OpenCV in one of my projects. Until now, I was using version 3 under Ubuntu 18.04, so in my meson.build I had: ... dependencies: [dependency('opencv')]) Now, I've compiled OpenCV 4 from source and installed to the default dir,…
dvilela
  • 1,200
  • 12
  • 29
0
votes
1 answer

issue with meson installaion

I am trying to install meson on my linux host. As i am not root user , So i have to try with --user argument for installing meson as per following source :- https://mesonbuild.com/Getting-meson.html Command :- pip3 install meson I am facing…
Naga
  • 59
  • 8
0
votes
1 answer

Why are the binaries generated by using Meson / Ninja much larger than those compiled by plain valac?

Same source file. directe compile use valac. ⭕ valac --pkg gtk+-3.0 -X -lm --pkg libcanberra src/Application.vala ⭕ ls Application -rwxrwxr-x 1 eexpss 48K 05-13 19:59 Application here is part of my…
eexpress
  • 386
  • 1
  • 14
0
votes
1 answer

What's wrong with my gjs meson build setup?

I have a Gnome GJS app and would like to package it with Meson. The app source (in ./src) has subfolders lib, object, and ui. Each subfolder has a meson.build file that looks like this (for the ./src/lib folder): app_resource =…
brainstormtrooper
  • 485
  • 2
  • 6
  • 18
0
votes
1 answer

Unable to get the wrap-file option in meson build system working

I was trying to cross compile glib for arm. It has a dependency on libffi, but found that a meson build for libffi was last updated 2 yrs back and there is a problem with what is available. Therefore i had to define a wrap file to take the latest…
badri
  • 575
  • 2
  • 8
  • 22
0
votes
1 answer

Meson build: Specify output directories

I have a c++ project that builds shared libraries, it also has a few binaries for packing resources into single files and trans-compiling few things into files easier for the library to process during runtime. To test the project I have a few tests.…
tusharkant15
  • 137
  • 1
  • 5
0
votes
1 answer

Include from upper layer of files

I've got main project structure in 1 folder, and units tests closed in another folder(2 different meson instances). In unit tests i need to include one file from main project(element to be tested). I dont want to specify relative path as i want to…
akimata
  • 131
  • 1
  • 7
0
votes
0 answers

Can VS Code Test Explorer Catch2 extension automatically outdate tests when sources change

I'm using VS Code Test Explorer with python extension on a project. It is awesome. If I change any source files, the relevant tests in Test explorer will be highlighted as out of date so I know I have to run them again to check everything is…
BrendanSimon
  • 665
  • 1
  • 9
  • 23
0
votes
2 answers

is there any similar way in meson as `cmake -LAH`?

I am debugging my meson build. I want to see all the cached variables as we do in cmake. Is there any way to do this? currently I have to go into the meson.build and add all the message() calls which is very inefficient. The python tricks vars()…
Wang
  • 7,250
  • 4
  • 35
  • 66
0
votes
1 answer

How to change output directory of a meson subproject?

Here is my meson.build: project('Adventum', 'cpp', version : '0.1.0', license : '', default_options : ['cpp_std=c++2a']) glfw = subproject('glfw').get_variable('glfw_dep') vulkan = dependency('vulkan') sources = ['src/main.cpp',…
小奥利奥
  • 231
  • 2
  • 9
0
votes
1 answer

gnome.gtk-doc() gives permission denied error in Yocto (do_install)

I am trying to generate HTML docs using meson build. I used gnome.gtkdoc() method for this from meson build system. Following is my meson.build file project('mydoc', 'c', version: '0.1.0') gnome = import('gnome') glib_prefix =…
vishnumotghare
  • 591
  • 1
  • 5
  • 23
0
votes
1 answer

Gnome-builder Run button doesn't run. It installs

I have set up a simple hello world in C++ with meson & ninja as a build chain. The project compiles just fine, but when I press the Run button it just runs ninja and then ninja install: ninja ninja install ninja: no work to do. [0/1] Installing…
Sillydan
  • 104
  • 13