Meson: Improve builds on Visual Studio-style compilers
Hi,
This attempts to improve the Visual Studio-style builds, where:
- We also use CMake to look for FreeType and libxml2, and make sure that Cargo knows about them so that things can build and link properly (tell Cargo not to use
pkg-config
if found with CMake, instead tell Cargo explicitly the directories and .lib filenames for these deps from what CMake finds so that things will link). - Fix building the Rust tests on Visual Studio, likewise, by passing in the needed environment settings, which was missed.
- Use the
--release
flag for Cargo on Visual Studio also when--buildtype=debugoptimized
, as Cargo also produces debug info (i.e. PDB files) even with the--release
flag, and this matches the meaning ofdebugoptimized
better. - Fix
rsvg-convert
build when-Dtriplet=...
is used, and copy the generated .pdb file for it as appropriate (note: I couldn't getinstall
to copy that .pdb file to$(PREFIX)\bin
, need to see how Meson works in regards to custom targets that is used forrsvg-convert
).
With blessings, thank you!