meson: Improve dependency check on Windows/MSVC
Hi,
This MR attempts to improve the build process via Meson on Windows using Visual Studio.
From the commit message:
On Visual Studio, it is quite common that many of the dependencies do not have build systems that generate pkg-config or CMake files upon the build, so we check for those dependencies manually if their pkg-config (or CMake) files could not be found.
For lcms2, we also need to check whether it is built as a static .lib or a DLL, as -DCMS_DLL must be passed into the CFlags when lcms2 is built as a DLL, otherwise linking will fail.
With blessings, thank you!