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.
Description
This PR consists of three commits to make it easier to differentiate between the intended changes. The commits will be squashed, or the second commit can be dropped if we intend to keep support for non-MSVC compilers/toolchains.
Modernize the project's CMake:
Updating to C/C++17 is required due to code in the capture-device-support submodule using C++17 features.
Remove support for non-MSVC compilers.
Since libdshowcapture is a Windows-only library, supporting GCC, Clang, and MinGW adds extra complication that we otherwise would not have to handle if we only support MSVC. This could be added back in the future if there is a reasonable justification for it.
Reformat CMake with gersemi
This matches the CMake formatting preferences in obs-studio.
Motivation and Context
The CMake currently in the repo fails to configure. I figured this was a good opportunity to do some cleanups. This could probably go further, and I do additionally intend to remove the
vs
folder containing the solution and project files. For now, I wanted to get this off of my local machine and placed here for public comment/review.How Has This Been Tested?
Tested locally on Windows 11. The CMake configures, generates a solution, and the solution can be built with VS2022.
You should be able to configure and generate a solution with:
Then you should be able to open the solution and build it with Visual Studio, or build it via CLI with CMake:
As far as I know, obs-studio itself does not use this repo's CMake, so these changes should not affect usage there.
Types of changes
Checklist: