diff --git a/modules/vstudio/vs2010_vcxproj.lua b/modules/vstudio/vs2010_vcxproj.lua index 16df6ef9..062754b1 100644 --- a/modules/vstudio/vs2010_vcxproj.lua +++ b/modules/vstudio/vs2010_vcxproj.lua @@ -127,6 +127,7 @@ m.keyword, m.projectName, m.targetPlatformVersion, + m.preferredToolArchitecture } end @@ -2172,6 +2173,15 @@ end + function m.preferredToolArchitecture(prj) + if prj.preferredtoolarchitecture == p.X86_64 then + m.element("PreferredToolArchitecture", nil, 'x64') + elseif prj.preferredtoolarchitecture == p.X86 then + m.element("PreferredToolArchitecture", nil, 'x86') + end + end + + function m.treatLinkerWarningAsErrors(cfg) if cfg.flags.FatalLinkWarnings then local el = iif(cfg.kind == p.STATICLIB, "Lib", "Linker") diff --git a/src/_premake_init.lua b/src/_premake_init.lua index 74c3b4a5..8c7387ab 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -1244,6 +1244,17 @@ kind = "boolean", } + api.register { + name = "preferredtoolarchitecture", + scope = "workspace", + kind = "string", + allowed = { + "Default", + p.X86, + p.X86_64, + } + } + ----------------------------------------------------------------------------- -- -- Field name aliases for backward compatibility