Skip to content

Support building with Meson on Visual Studio

Chun-wei Fan requested to merge use-dllexport-3-24-meson into gtkmm-3-24

Hi,

(Please note that this builds on top of MR !25 (merged), as !24 (closed) will actually depend on !25 (merged))

This updates the Meson build files support building gtkmm-3-24 on Visual Studio as well, by:

  • Cleaning up dependency checking. The -mm dependencies now have Meson build files, so we can just look for them via pkg-config.
  • Update [gdk|gtk]mmconfig.h.meson so that they will be like [gdk|gtk]mmconfig.h.in in !25 (merged), where GDKMM_API and GTKMM_API is being defined.
  • Ignore more warnings in the Meson build files on Visual Studio, more or less like what is done in the NMake Makefiles.
  • Fix linking the test and demo programs where gui_app is set to be true. Also use '-utf-8' on the C compiler, as we will be using it to build the GResource C file that is generated when building gtkmm-demo.
  • Update the NMake Makefiles so that we can build directly from Meson-generated source releases, after running nmake /f Makefile.vc CFG=$(CFG) prep-git-build.
  • Fix building on Meson builds when we still need to use gendef.exe, by defining GDKMM_USE_GENDEF and GTKMM_USE_GENDEF when necessary, and making sure that we do link to the gdkmm .lib when linking gtkmm when gendef.exe is used.

Closes !24 (closed) as this includes the commits from there.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports