CMake: vcpkg submodule, cure issues 446 and 481, CMake presets #515
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make vcpkg a Git submodule, simplifying new-to-SIMH-on-Windows users' lives. vcpkg is automagically initialized and updated by the CMake configure phase.
Issue vcpkg now requires a builtin-baseline entry in vcpkg.json (or a separate vcpkg-configuration.json file) #446: Visual Studio comes with its own built-in vcpkg that requires 'builtin-baseline' in vcpkg.json to nail down the Git release hash. This complicates future open-simh maintenance because the GitHub vcpkg project does monthly release tags, which would require updating the 'builtin-baseline' hash periodically.
Visual Studio exports the VisualStudioVersion environment variable when it invokes the CMake configuration phase. Detect this environment variable and redirect VCPKG_ROOT to the open-simh vcpkg submodule to avoid the 'builtin-baseline' issue.
Issue Unnecessary static linking of zlib in cmake infrastructure #481: Linking with static zlib should only happen on Windows and only if building BUILD_SHARED_DEPS=False.
Re-evaluate BUILD_SHARED_DEPS for Windows builds, ensuring that the option is respected if set to True by the user (i.e., don't force static dependency linking.)
Add an intial set of CMake presets, suggested by @LegalizeAdulthood. 'cmake --list-presets' lists the current set of presets.
cmake/cmake-cleaner.ps1: PowerShell script to clean build directories, build artifacts and the vcpkg archive to produce a clean Windows build environment. Useful when testing out BUILD_SHARED_DEPS=True and then reverting back to BUILD_SHARED_DEPS=False.