]> git.tdb.fi Git - builder.git/commitdiff
Set PATH in Visual Studio projects
authorMikko Rasa <tdb@tdb.fi>
Sat, 4 May 2024 11:26:06 +0000 (14:26 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 4 May 2024 11:26:06 +0000 (14:26 +0300)
This allows the built program to be run without copying DLLs to the
project directory.

plugins/msvc/vcxprojectgenerator.cpp

index a9bbd5203c995adf294b3ed1e5b88e07cec32fe9..4fa7d4182307c166a39b9af198f1beedb6abb5da 100644 (file)
@@ -85,7 +85,10 @@ bool VcxProjectGenerator::_run(const VcxProjectFile &project)
                        IO::print(out, "\t\t<NMakeCleanCommandLine>%s -c</NMakeCleanCommandLine>\n", config_cmd);
                        IO::print(out, "\t\t<NMakeReBuildCommandLine>%s -B</NMakeReBuildCommandLine>\n", config_cmd);
                        if(exe)
+                       {
                                IO::print(out, "\t\t<NMakeOutput>%s</NMakeOutput>\n", exe->get_path());
+                               IO::print(out, "\t\t<LocalDebuggerEnvironment>PATH=%s;$(PATH)\n$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>\n", builder.get_prefix()/"bin");
+                       }
                        IO::print(out, "\t</PropertyGroup>\n");
                }