PremakeDeps¶
Warning
This feature is experimental and subject to breaking changes. See the Conan stability section for more information.
The PremakeDeps
is the dependencies generator for Premake.
The generator can be used by name in conanfiles:
class Pkg(ConanFile):
generators = "PremakeDeps"
[generators]
PremakeDeps
And it can also be fully instantiated in the conanfile generate()
method:
from conan import ConanFile
from conan.tools.premake import PremakeDeps
class App(ConanFile):
settings = "os", "arch", "compiler", "build_type"
requires = "zlib/1.2.11"
def generate(self):
deps = PremakeDeps(self)
deps.generate()
Important
The PremakeDeps
generator must be used in conjunction with the
PremakeToolchain generator, as it will
generate a include('conandeps.premake5.lua')
that will be automatically
included by the toolchain.
Generated files¶
PremakeDeps
will generate a conandeps.premake5.lua
script file which
will be injected later by the toolchain and the following files per dependency in the conanfile.generators_folder
:
conan_<pkg>.premake5.lua
: will be including the proper script depending on thebuild_type
and architecture.conan_<pkg>_vars_<config>.premake5.lua
: will contain essentially the following information for the specific dependency, architecture and build_type:includedirs
libdirs
bindirs
sysincludedirs
frameworkdirs
frameworks
libs
syslibs
defines
cxxflags
cflags
sharedlinkflags
exelinkflags
All this information will be loaded in the conandeps.premake5.lua
script
and injected later to the main premake script, allowing a transparent and easy to use dependency management with conan.