Move to building cairo with meson
cairo upstream recently got support for the meson build system which also supports Windows builds with MSVC.
Since this project seems to be one of the last users of the make based win32 build system, porting would allow upstream cairo to drop this old build system code.
CairoSharp is a C# wrapper for .NET Standard 1.6/2.0 of cairo with all native dependencies included, in case you are interested. The native project are originally taken from Cairo-VS.
I don't want to deal with build system bullshit, so I created CairoSharp.
BTW, CairoSharp also provided demos using cairo in a console, Winform or WPF application.
@lazka Is it possible to build a standalone DLL file as this project provides? That would be a lot helpful or we would be embedding a lot of DLL files in pycairo wheel. I had setup Appveyor to try and build it. See https://ci.appveyor.com/project/naveen521kk/cairo-windows. But will it work for pycairo?
In a 64 bit Windows VM I was able to generate DLL and Lib:
Create the build directory
meson build --backend=vs
Build the DLL and lib
meson compile -C build
Files are output into
build\src
In theory I should have been able to use meson dist it runs the test suite though, which has a number of tests that don't pass or that time out.
Under Windows some of the tests throw up dialog boxes when they fail.
Some info on test issues https://people.gnome.org/~federico/blog/helping-cairo.html https://lists.cairographics.org/archives/cairo/2020-November/029080.html
Just a heads-up that upstream cairo is working towards dropping support for all non-Meson build systems.
Just a heads-up that upstream cairo is working towards dropping support for all non-Meson build systems.
This has officially happened with the 1.17.8 release, as I've sadly learned today. I was able to use the script in this repo for almost all of the other steps though. For some reason the pixman step bombed during the script but when I went into the folder and manually ran that command (by copy pasting, literally) it ran ok. It might have been a relative path issue before and after but I'm not sure. Once I can finally get that one compiled I'd be happy to drop a new version in the releases here if the bosses will allow it. For the record, I greatly appreciate this repo because it's a long journey to get to a fresh cairo binary on windows and this is really the only one that is mostly up to date and works all the way through. Let me know how I can help.
Have a look at https://github.com/pygobject/cairo-win-build