Skip to content

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

Answered by samsinsane
Alriightyman asked this question in Q&A
Discussion options

You must be logged in to vote

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 use myapi "Value" in the project configuration, and then the conditional in your override would be if prj.myapi == "Value" then.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Alriightyman
Comment options

Answer selected by Alriightyman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants