Add Build Customizations option
Support Build Customization settings for projects. Now Premake5 can recognize Build Customizations File that 3rd party API (e.g. CUDA) maded.
This commit is contained in:
parent
13d0008a3f
commit
2eacbe8623
@ -77,6 +77,12 @@
|
||||
pathVars = true,
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "buildcustomizations",
|
||||
scope = "project",
|
||||
kind = "list:string",
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "builddependencies",
|
||||
scope = { "rule" },
|
||||
|
@ -1313,6 +1313,7 @@
|
||||
m.elements.importExtensionTargets = function(prj)
|
||||
return {
|
||||
m.importRuleTargets,
|
||||
m.importBuildCustomizationsTargets
|
||||
}
|
||||
end
|
||||
|
||||
@ -1330,6 +1331,12 @@
|
||||
end
|
||||
end
|
||||
|
||||
function m.importBuildCustomizationsTargets(prj)
|
||||
for i, build in ipairs(prj.buildcustomizations) do
|
||||
premake.w('<Import Project="$(VCTargetsPath)\\BuildCustomizations\\%s.targets" />', path.translate(build))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.importDefaultProps(prj)
|
||||
@ -1345,6 +1352,7 @@
|
||||
m.elements.importExtensionSettings = function(prj)
|
||||
return {
|
||||
m.importRuleSettings,
|
||||
m.importBuildCustomizationsProps
|
||||
}
|
||||
end
|
||||
|
||||
@ -1362,6 +1370,12 @@
|
||||
end
|
||||
end
|
||||
|
||||
function m.importBuildCustomizationsProps(prj)
|
||||
for i, build in ipairs(prj.buildcustomizations) do
|
||||
premake.w('<Import Project="$(VCTargetsPath)\\BuildCustomizations\\%s.props" />', path.translate(build))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
function m.importLibrary(cfg)
|
||||
|
Loading…
Reference in New Issue
Block a user