Skip to content

Commit afbbc9a

Browse files
authored
Merge pull request #2537 from Domain/vs_args
Add runtime arguments in project file. Fix #2536
2 parents b1a7ceb + a798e0a commit afbbc9a

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

xmake/plugins/project/vsxmake/getinfo.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ function _make_targetinfo(mode, arch, target)
227227
end
228228
targetinfo.runenvs = table.concat(runenvstr, "\n")
229229

230+
local runargs = target:get("runargs")
231+
if runargs then
232+
targetinfo.runargs = os.args(table.wrap(runargs))
233+
end
234+
230235
-- use mfc? save the mfc runtime kind
231236
if target:rule("win.sdk.mfc.shared_app") or target:rule("win.sdk.mfc.shared") then
232237
targetinfo.mfckind = "Dynamic"

xmake/plugins/project/vsxmake/vsproj/Xmake.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,12 @@
159159
<LocalDebuggerWorkingDirectory>$(XmakeRunDir)</LocalDebuggerWorkingDirectory>
160160
<LocalDebuggerEnvironment>$(XmakeRunEnvs)
161161
$(LocalDebuggerEnvironment)</LocalDebuggerEnvironment>
162+
<LocalDebuggerCommandArguments>$(XmakeRunArgs)</LocalDebuggerCommandArguments>
162163
<LocalDebuggerMergeEnvironment>true</LocalDebuggerMergeEnvironment>
163164
<RemoteDebuggerWorkingDirectory>$(XmakeRunDir)</RemoteDebuggerWorkingDirectory>
164165
<RemoteDebuggerEnvironment>$(XmakeRunEnvs)
165166
$(RemoteDebuggerEnvironment)</RemoteDebuggerEnvironment>
167+
<RemoteDebuggerCommandArguments>$(XmakeRunArgs)</RemoteDebuggerCommandArguments>
166168
</PropertyGroup>
167169

168170
<!-- Common files -->

xmake/plugins/project/vsxmake/vsproj/Xmake.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ MSBuild Properties:
146146
XmakeSourceDirs: $(XmakeSourceDirs)
147147
XmakePrecompiledHeader: $(XmakePrecompiledHeader)
148148
XmakeRunEnvs: $(XmakeRunEnvs)
149+
XmakeRunArgs: $(XmakeRunArgs)
149150
Xmake Path:
150151
XmakeProgramDir: $(XmakeProgramDir)
151152
XmakeProjectDir: $(XmakeProjectDir)

xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch)

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<XmakeWindowsSdkVersion>#sdkver#</XmakeWindowsSdkVersion>
1414
<XmakeMfcKind>#mfckind#</XmakeMfcKind>
1515
<XmakeRunEnvs>#runenvs#</XmakeRunEnvs>
16+
<XmakeRunArgs>#runargs#</XmakeRunArgs>
1617
<XmakeConfigFlags>#configflags#</XmakeConfigFlags>
1718
<XmakeIncludeDirs>#includedirs#</XmakeIncludeDirs>
1819
<XmakeLinkDirs>#linkdirs#</XmakeLinkDirs>

0 commit comments

Comments
 (0)