1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Set pdb filename to match pdb output file to workaround broken VS2019 copy step

When building a static library, VS2019 replaces the generated link pdb file with the one created during compilation due to a broken copy step in Microsoft.CppCommon.targets. This workaround generates the pdb in the output directory so the copy step is skipped.
This commit is contained in:
ed 2021-04-17 17:52:47 +01:00
parent ee76137441
commit a483fb58ee

View file

@ -534,6 +534,7 @@ public:
}
bool isUsingEditAndContinue = false;
const auto pdbFilename = getOwner().getIntDirFile (config, config.getOutputFilename (".pdb", true, type == UnityPlugIn));
{
auto* cl = group->createNewChildElement ("ClCompile");
@ -559,7 +560,7 @@ public:
cl->createNewChildElement ("PrecompiledHeader")->addTextElement ("NotUsing");
cl->createNewChildElement ("AssemblerListingLocation")->addTextElement ("$(IntDir)\\");
cl->createNewChildElement ("ObjectFileName")->addTextElement ("$(IntDir)\\");
cl->createNewChildElement ("ProgramDataBaseFileName")->addTextElement ("$(IntDir)\\");
cl->createNewChildElement ("ProgramDataBaseFileName")->addTextElement (pdbFilename);
cl->createNewChildElement ("WarningLevel")->addTextElement ("Level" + String (config.getWarningLevel()));
cl->createNewChildElement ("SuppressStartupBanner")->addTextElement ("true");
cl->createNewChildElement ("MultiProcessorCompilation")->addTextElement (config.shouldUseMultiProcessorCompilation() ? "true" : "false");
@ -605,7 +606,7 @@ public:
link->createNewChildElement ("IgnoreSpecificDefaultLibraries")->addTextElement (isDebug ? "libcmt.lib; msvcrt.lib;;%(IgnoreSpecificDefaultLibraries)"
: "%(IgnoreSpecificDefaultLibraries)");
link->createNewChildElement ("GenerateDebugInformation")->addTextElement ((isDebug || config.shouldGenerateDebugSymbols()) ? "true" : "false");
link->createNewChildElement ("ProgramDatabaseFile")->addTextElement (getOwner().getIntDirFile (config, config.getOutputFilename (".pdb", true, type == UnityPlugIn)));
link->createNewChildElement ("ProgramDatabaseFile")->addTextElement (pdbFilename);
link->createNewChildElement ("SubSystem")->addTextElement (type == ConsoleApp ? "Console" : "Windows");
if (! config.is64Bit())