From a1bad3596d4b74a50874572007d4bcc012c5a78b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 4 May 2024 14:26:06 +0300 Subject: [PATCH] Set PATH in Visual Studio projects This allows the built program to be run without copying DLLs to the project directory. --- plugins/msvc/vcxprojectgenerator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/msvc/vcxprojectgenerator.cpp b/plugins/msvc/vcxprojectgenerator.cpp index a9bbd52..4fa7d41 100644 --- a/plugins/msvc/vcxprojectgenerator.cpp +++ b/plugins/msvc/vcxprojectgenerator.cpp @@ -85,7 +85,10 @@ bool VcxProjectGenerator::_run(const VcxProjectFile &project) IO::print(out, "\t\t%s -c\n", config_cmd); IO::print(out, "\t\t%s -B\n", config_cmd); if(exe) + { IO::print(out, "\t\t%s\n", exe->get_path()); + IO::print(out, "\t\tPATH=%s;$(PATH)\n$(LocalDebuggerEnvironment)\n", builder.get_prefix()/"bin"); + } IO::print(out, "\t\n"); } -- 2.45.2