This is a bugfix written by PatTheMav for obs-studio which applies equally to obs-plugintemplate.
Quote [1]:
CMake 3.25 changed the way PDB generation is handled by only enabling it for Debug and RelWithDebInfo builds, which prohibits generation of fully optimized builds with associated symbols (which is MSVC's default).
If configuring with CMake 3.25 or above, enable this globally for builds using MSVC and fall back to embedded debug information for anything else (which would probably be clang-cl)
Motivation and Context
CI builds tags as Release. As a result, there's no pdb generated.
It is desirable to ship pdb for better user support.
How Has This Been Tested?
Tested on a third-party plugin.
The pdb are generated now in Release builds.
Types of changes
Bug fix (non-breaking change which fixes an issue)
Description
This is a bugfix written by PatTheMav for obs-studio which applies equally to obs-plugintemplate. Quote [1]: CMake 3.25 changed the way PDB generation is handled by only enabling it for Debug and RelWithDebInfo builds, which prohibits generation of fully optimized builds with associated symbols (which is MSVC's default).
If configuring with CMake 3.25 or above, enable this globally for builds using MSVC and fall back to embedded debug information for anything else (which would probably be clang-cl)
Motivation and Context
CI builds tags as Release. As a result, there's no pdb generated. It is desirable to ship pdb for better user support.
How Has This Been Tested?
Tested on a third-party plugin. The pdb are generated now in Release builds.
Types of changes
Checklist: