@John_E
I believe in a recent Post of the two Main Dev’s there was some talk about going away from WAF to Meson, but there was not much love especially for CMake and Autotools. With WAF on Windows with MSVC i had very limited success while cmake as a build system which can cater MSVC and GCC and CLANG at the same time from the same source and header’s makes it a lot easier to do source based cross platform compile, without MinGW or MSYS2 installations. But i don’t know a lot about MESON other then building Pidgin3 (IRC and Chat client under Debian Testing successful with it it with the help of the Main Dev Gary Kramlich as he was live on Twitch as responded to some problems with Meson.
However: The Phind Dev A.I responded to the question, if the MESON build system can be used in the same way as CMake (having one source, build the binaries on different platforms) should be possible.
The response was:
Meson is designed to be cross-platform and works with different compilers and environments without requiring changes to the build script itself.
From what i found out, a minimalistic C/C++ Program with MESON on all Ardour Platforms could work like this:
/* Small C/C++ test program /*
#include “my_header.h”
int main(void) {
print_hello();
return 0;
}
/’ Custom header */
#ifndef MY_HEADER_H
#define MY_HEADER_H
void print_hello(void);
#endif // MY_HEADER_H
/* Corresponding source for custom header */
#include <stdio.h>
#include “my_header.h”
void print_hello(void) {
printf(“Hello, World!\n”);
}
// The MESON Build script: meson.build
As far as i know, it is also the favored GTK build system but i am not sure if this covers GTK2 as well.
It sure does GTK3 and GTK4 and as well the Genome GLIB’s,
executable(‘my_program’, ‘main.c’, ‘hello.c’,
include_directories: include_directories(‘.’),
install: true)
Now build the thing with MSVC and MESON - expects meson.build file
meson setup builddir --backend vs2019*
meson compile -C builddir
// creates a Windows PE32+ 64-But x86_64 Bit Executable
// Now the same for GCC and CLANG on NIX
meson setup builddir
meson compile -C builddir*
// created a Linux ELF, MachO x86_64 or ARM64 executable
It looks like CMake works to me and. The ABI is different for any platform but you have
just 1 source, 1 build script but many binaries for different Compilers and operating systems.