Defining an override in a C# project file is also adding it to other C# project files that I don't want them added to. #2213
-
I have 2 C# projects - one that needs an extra bit in a property group and the other does not. However, even though the override is only defined in one of the project files, it always applies to the other project too. How can I tell premake to only use it in the project file its defined in? for reference: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can either register an API and use that, which would give you the most flexibility to enable this override for any project you want. Or, you can just wrap the extra output in an |
Beta Was this translation helpful? Give feedback.
You can either register an API and use that, which would give you the most flexibility to enable this override for any project you want. Or, you can just wrap the extra output in an
if prj.name == "MyProj" then ... end
. For examples of how APIs are registered, see this file which contains most of the APIs in Premake, then you would usemyapi "Value"
in the project configuration, and then the conditional in your override would beif prj.myapi == "Value" then
.