38 lines
883 B
Python
38 lines
883 B
Python
from conan import ConanFile
|
|
from conan.tools.meson import MesonToolchain, Meson
|
|
from conan.tools.gnu import PkgConfigDeps
|
|
|
|
|
|
class helloConan(ConanFile):
|
|
name = "hello"
|
|
version = "1.0"
|
|
package_type = "application"
|
|
|
|
# Binary configuration
|
|
settings = "os", "compiler", "build_type", "arch"
|
|
|
|
# Sources are located in the same place as this recipe, copy them to the recipe
|
|
exports_sources = "meson.build", "src/*"
|
|
|
|
|
|
|
|
def layout(self):
|
|
self.folders.build = "build"
|
|
|
|
def requirements(self):
|
|
self.requires("zlib/1.2.11")
|
|
|
|
def generate(self):
|
|
deps = PkgConfigDeps(self)
|
|
deps.generate()
|
|
tc = MesonToolchain(self)
|
|
tc.generate()
|
|
|
|
def build(self):
|
|
meson = Meson(self)
|
|
meson.configure()
|
|
meson.build()
|
|
|
|
def package(self):
|
|
meson = Meson(self)
|
|
meson.install()
|