Tools and libraries to glue C/C++ APIs to high-level languages
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

23 lines
834 B

-- https://github.com/premake/premake-core/issues/1559
premake.override(premake.vstudio.vc2010, "targetFramework", function(oldfn, prj)
if prj.clr == "NetCore" then
local action = premake.action.current()
local tools = string.format(' ToolsVersion="%s"', action.vstudio.toolsVersion)
local framework = prj.dotnetframework or action.vstudio.targetFramework or "4.0"
premake.w('<TargetFramework>%s</TargetFramework>', framework)
else
oldfn(prj)
end
end)
-- https://github.com/premake/premake-core/issues/1549
premake.override(premake.vstudio.cs2005.elements, "projectProperties", function(base, cfg)
local calls = base(cfg);
table.insert(calls, function(cfg)
if cfg.clr == "Unsafe" then
premake.w('<AllowUnsafeBlocks>true</AllowUnsafeBlocks>')
end
end)
return calls;
end)