Skip to content

cmake: Switch preset to VS 2026#13392

Open
thomasza92 wants to merge 1 commit into
obsproject:masterfrom
thomasza92:update-vs2026
Open

cmake: Switch preset to VS 2026#13392
thomasza92 wants to merge 1 commit into
obsproject:masterfrom
thomasza92:update-vs2026

Conversation

@thomasza92
Copy link
Copy Markdown

Description

Updates the Visual Studio generator in CMakePresets.json from Visual Studio 2022 to Visual Studio 2026. This would be a breaking change for anyone still on Visual Studio 2022 and would require them to update.

Motivation and Context

In order to build from source using the newest version of Visual Studio this line had to be updated. Many people may still be on Visual Studio 2022 but I am not sure that this version is still available to download from Microsoft. At some point in the future this will eventually need to be updated.

How Has This Been Tested?

I used it myself to build OBS from source on Windows 11 using Visual Studio 2026 Enterprise Edition.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Updates the Visual Studio generator in CMakePresets.json from
Visual Studio 2022 to Visual Studio 2026.
@Warchamp7
Copy link
Copy Markdown
Member

Warchamp7 commented May 3, 2026

Noting that indeed Microsoft no longer offers Visual Studio Community 2022 and anyone getting started with development using the Community version will have to use 2026.

However as evidenced by the failed check, the presets are also used by the build workflows. GitHub runners are still only in public preview for VS2026 for the time being.

I'd recommend that people set up a CMakeUserPresets.json in the interim, which is what I am currently doing. Or you can override the generator via CMake using -G Visual Studio 18 2026

@danrossi
Copy link
Copy Markdown

danrossi commented May 4, 2026

This is my current cmake configure and build command

 cmake -G "Visual Studio 18 2026" -A x64 --preset windows-x64
  cmake -G "Visual Studio 18 2026" --build --preset windows-x64 

@WizardCM WizardCM added kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. platform/windows Categorizes issue or PR as affecting Windows specifically labels May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Enhancements are not bugs or new features but can improve usability or performance. platform/windows Categorizes issue or PR as affecting Windows specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants