summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-07-06 16:35:37 +0800
committerGitHub <[email protected]>2022-07-06 16:35:37 +0800
commitafbbc9a0ed32f096a7e5006edfe042db547807c8 (patch)
tree85fea0cd8e674e7c1ddbb9f9c2aa597350ea42cf
parentb1a7cebd5fedb7014c78255622454464b17f4a61 (diff)
parenta798e0aed639458a4da0faabf47ad076db37eb0f (diff)
Merge pull request #2537 from Domain/vs_args
Add runtime arguments in project file. Fix #2536
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua5
-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, 9 insertions, 0 deletions
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua
index a3063038f..e45947482 100644
--- a/xmake/plugins/project/vsxmake/getinfo.lua
+++ b/xmake/plugins/project/vsxmake/getinfo.lua
@@ -227,6 +227,11 @@ function _make_targetinfo(mode, arch, target)
end
targetinfo.runenvs = table.concat(runenvstr, "\n")
+ local runargs = target:get("runargs")
+ if runargs then
+ targetinfo.runargs = os.args(table.wrap(runargs))
+ end
+
-- use mfc? save the mfc runtime kind
if target:rule("win.sdk.mfc.shared_app") or target:rule("win.sdk.mfc.shared") then
targetinfo.mfckind = "Dynamic"
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>