File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -57,3 +57,40 @@ The ``Premake`` build helper is affected by these ``[conf]`` variables:
5757- ``tools.build:verbosity `` which accepts one of ``quiet `` or ``verbose `` and sets the ``--quiet `` flag in ``Premake.configure() ``
5858
5959- ``tools.compilation:verbosity `` which accepts one of ``quiet `` or ``verbose `` and sets the ``--verbose `` flag in ``Premake.build() ``
60+
61+ Extra configuration
62+ -------------------
63+
64+ By default, typical Premake configurations are ``Release `` and ``Debug ``.
65+ This configurations could vary depending on the used Premake script.
66+
67+ For example,
68+
69+ .. code-block :: lua
70+
71+ workspace "MyProject"
72+ configurations { "Debug", "Release", "DebugDLL", "ReleaseDLL" }
73+
74+ If you wish to use a different configuration than ``Release `` or ``Debug ``, you can override the configuration from the ``Premake `` generator.
75+
76+ If the project also have dependencies, you will also need to override the
77+ ``configuration `` property of the ``PremakeDeps `` generator accordingly, with the same value.
78+
79+ .. code-block :: python
80+
81+ class MyRecipe (Conanfile ):
82+ ...
83+ def _premake_configuration (self ):
84+ return str (self .settings.build_type) + (" DLL" if self .options.shared else " " )
85+
86+ def generate (self ):
87+ deps = PremakeDeps(self )
88+ deps.configuration = self ._premake_configuration
89+ deps.generate()
90+ tc = PremakeToolchain(self )
91+ tc.generate()
92+
93+ def build (self ):
94+ premake = Premake(self )
95+ premake.configure()
96+ premake.build(workspace = " MyProject" , configuration = self ._premake_configuration)
You can’t perform that action at this time.
0 commit comments