To do an out-of-source build in Meson:
cd /path/to/source/
mkdir ../builddir
Then:
cd /path/to/source/
meson ../builddir
cd ../builddir
ninja
Is it possible to do anything like this (from builddir):
meson --pathToSource ../source // pseudocode
ninja
I.e. avoid jumping from the source to the build directory and back.
For CMake, this is the default.
Once you've run
mesonto create build directory (whichmesoncan create automatically), there is no need to run it everytime you change meson.build. When you runninja, meson can regenerate build configurations itself depending on the changes in the sources.To run
ninjain other places than build directory, you can you-Coption (fromninja -h):Given your example, it will be: