From f8bd0442d13dfad65a2cc25d78fd0214a8745675 Mon Sep 17 00:00:00 2001 From: Domain Date: Wed, 6 Jul 2022 12:03:18 +0800 Subject: Add runtime arguments in project file. Fix #2536 --- xmake/plugins/project/vsxmake/getinfo.lua | 1 + xmake/plugins/project/vsxmake/vsproj/Xmake.props | 2 ++ xmake/plugins/project/vsxmake/vsproj/Xmake.targets | 1 + .../project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch) | 1 + 4 files changed, 5 insertions(+) diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index a3063038f..895d33f22 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -226,6 +226,7 @@ function _make_targetinfo(mode, arch, target) table.insert(runenvstr, k .. "=" .. v) end targetinfo.runenvs = table.concat(runenvstr, "\n") + targetinfo.runargs = target:get("runargs") -- use mfc? save the mfc runtime kind if target:rule("win.sdk.mfc.shared_app") or target:rule("win.sdk.mfc.shared") then diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.props b/xmake/plugins/project/vsxmake/vsproj/Xmake.props index a7faaa1ad..9fa9f7ea1 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.props +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.props @@ -159,10 +159,12 @@ $(XmakeRunDir) $(XmakeRunEnvs) $(LocalDebuggerEnvironment) + $(XmakeRunArgs) true $(XmakeRunDir) $(XmakeRunEnvs) $(RemoteDebuggerEnvironment) + $(XmakeRunArgs) diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets index ad5777293..39b7da128 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets @@ -146,6 +146,7 @@ MSBuild Properties: XmakeSourceDirs: $(XmakeSourceDirs) XmakePrecompiledHeader: $(XmakePrecompiledHeader) XmakeRunEnvs: $(XmakeRunEnvs) + XmakeRunArgs: $(XmakeRunArgs) Xmake Path: XmakeProgramDir: $(XmakeProgramDir) XmakeProjectDir: $(XmakeProjectDir) diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch) index 4832d8e93..6d5b4165d 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch) @@ -13,6 +13,7 @@ #sdkver# #mfckind# #runenvs# + #runargs# #configflags# #includedirs# #linkdirs# -- cgit v1.3.1