Hi all,
I managed to build a somewhat fully functional Synfig using MSVC (except for ImageMagick dependency). I basically rebuilt all the dependencies from source, which was quite the chore, but I figured that if I were to write conan/vcpkg recipes, I would have to learn to do this.
As for changes to synfig, they were minimal.
Primarily, the hack used in “valuenode_registery.h” to register value nodes does not work with MSVC
As can be seen here:
Works with gcc: godbolt
Doesn’t work with MSVC: godbolt
I used a simpler method to replace it:
Also a couple of small changes to the CMake scripts.
The result is that building synfig with MSVC is as easy as passing the flags:
-DCMAKE_PREFIX_PATH="${prefix}" -DLTDL_LIBRARIES="${prefix}/lib/libltdl.dll.a"
to cmake. And Pkg config is used as in the MinGW build to find dependencies inside the prefix.
I will look into conan next as I think it’s a more viable option than vcpkg since there are missing dependencies in vcpkg, and conan is decentralized, and there is no need for any external approval.
https://drive.google.com/file/d/10MX3IXb6IN9jZoSGrubnxzTrLBCo2Kr2/view?usp=sharing