summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDomain <[email protected]>2022-07-06 12:03:18 +0800
committerDomain <[email protected]>2022-07-06 12:03:18 +0800
commitf8bd0442d13dfad65a2cc25d78fd0214a8745675 (patch)
tree56abb11be23027f8841309b10df3efe44eeb9dcd
parent4ee209c6235385a6e2b4182cab870f14067a50d1 (diff)
Add runtime arguments in project file. Fix #2536
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua1
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/Xmake.props2
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/Xmake.targets1
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch)1
4 files changed, 5 insertions, 0 deletions
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 @@
<LocalDebuggerWorkingDirectory>$(XmakeRunDir)</LocalDebuggerWorkingDirectory>
<LocalDebuggerEnvironment>$(XmakeRunEnvs)
$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>
+ <LocalDebuggerCommandArguments>$(XmakeRunArgs)</LocalDebuggerCommandArguments>
<LocalDebuggerMergeEnvironment>true</LocalDebuggerMergeEnvironment>
<RemoteDebuggerWorkingDirectory>$(XmakeRunDir)</RemoteDebuggerWorkingDirectory>
<RemoteDebuggerEnvironment>$(XmakeRunEnvs)
$(RemoteDebuggerEnvironment)</RemoteDebuggerEnvironment>
+ <RemoteDebuggerCommandArguments>$(XmakeRunArgs)</RemoteDebuggerCommandArguments>
</PropertyGroup>
<!-- Common files -->
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 @@
<XmakeWindowsSdkVersion>#sdkver#</XmakeWindowsSdkVersion>
<XmakeMfcKind>#mfckind#</XmakeMfcKind>
<XmakeRunEnvs>#runenvs#</XmakeRunEnvs>
+ <XmakeRunArgs>#runargs#</XmakeRunArgs>
<XmakeConfigFlags>#configflags#</XmakeConfigFlags>
<XmakeIncludeDirs>#includedirs#</XmakeIncludeDirs>
<XmakeLinkDirs>#linkdirs#</XmakeLinkDirs>