The most important thing is that once you know what to do, vcpkg is dead simple to set up. Compiling some libraries may take a while but is normally a one-time affair.
The step by step explanation is 3 lines:
'git clone path-to-vcpkg-repo'
run vcpkg bootstrap loader
When starting CMake pass the toolchain file found in 'path-to-toolchain-file'. In the CMake GUI it can be entered when activating 'Specify toolchain file for compiling'
Of course with better to understand phrasing.
Once this is done the rest will be automatic. So the important thing is, what to set up? We currently provide several dependencies as local copies for Windows. And the CMake files for these are old and horrible. We also provide a precompiled version of libvpx, made by the EDuke32 team. This alone is reason enough for me to get rid of it as it is old and unmaintained.
So, now that vcpkg itself is working fine there's a few things to be considered:
clean up the dependencies on these local copies of 3 libraries and libvpx. Like I said, the CMake for this is awful and in an outdated style. It should be modernized, preferably without the local copies. But for this we need to decide on making vcpkg mandatory on Windows. We may have to anyway if more features come along.
modernize the CMake code in general. After updating to CMake 3.27 I get a bootload of warnings for these old subprojects. Unfortunately I do not have the time to familiarize myself with modern CMake to perform this task. Someone else has to help out.
Before going on with video codecs we will have to set up ZMusic so that it a) gets pulled in automatically and b) gets statically compiled into the EXE. This is necessary to have its dependencies available which are also needed by the audio decoders for modern video formats.
Alternatively, of course, we can go the standard route of shipping 100 or so DLLs, like most ports developed on Linux, but I fail to see the advantage of that. Binary size will inevitably be larger because it includes all unused parts of these libraries - doing a static compile would also be easier for building AppImages or Flatpaks on Linux.
Before merging the PR for this I'd like to get some feedback from the community. Just a note: This is a prerequisite for adding WebP or Webm/Theora support because manually managing these libraries on Windows is a no-go. So if this feature is rejected, there won't be any better graphics or video formats, simple as that.