Todo-C/conanfile.py

39 lines
921 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("cwalk/1.2.8")
self.requires("cjson/1.7.18")
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()