Skip to content

Build with Meson

Kjell Ahlstedt requested to merge wip/kjellahl/meson-build into master

This MR shows how pangomm can be built with Meson instead of Autotools. It depends on mm-common!2 (merged). It uses new options in the mm-common-prepare command.

It's not trivial to use Meson for building a module such as pangomm or similar C++ bindings of Gnome modules. Marcin Kolny had a try with glibmm two years ago. (See the mkolny/meson-build branch in glibmm.) Unfortunately he didn't finish the job. I've chosen pangomm. It's a small module, suitable for a first try to build a C++ binding module with Meson.

The gmmproc command generates code in .h/.cc files from .hg/.ccg files. That's no problem doing with Meson as long as the generated files are stored in the build directory tree. The most problematic part is the maintainer-mode feature. In maintainer-mode, depend on mm-common and Doxygen. In a tarball, include generated .h/.cc files and the reference documentation. Typically, when building from a tarball, don't generate .h/.cc files or documentaion, don't depend on mm-common and Doxygen.

I've let ninja dist store the generated files, and files copied by mm-common-prepare, in an untracked/ directory. When pangomm is then built with maintainer-mode=false, files are read from the untracked/ directory in the source tree. untracked because these files are not tracked by a source control program, such as git.

Edited by Kjell Ahlstedt

Merge request reports