-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathconanfile.py
More file actions
42 lines (34 loc) · 1.33 KB
/
Copy pathconanfile.py
File metadata and controls
42 lines (34 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os
from conan import ConanFile
from conan.tools.meson import MesonToolchain, Meson
from conan.tools.files import copy
class RangConan(ConanFile):
name = "rang"
version = "3.2.0"
license = "The Unlicense"
url = "https://github.com/agauniyal/rang"
description = "A Minimal, Header only Modern c++ library for colors in your terminal"
settings = "os", "compiler", "build_type", "arch"
exports_sources = "meson.build", "include/*", "test/*", "CMakeLists.txt", "LICENSE", "README.md", "cmake/*"
def requirements(self):
self.test_requires("doctest/2.4.11")
def build_requirements(self):
self.tool_requires("pkgconf/2.1.0")
def layout(self):
from conan.tools.layout import basic_layout
basic_layout(self)
def generate(self):
tc = MesonToolchain(self)
tc.generate()
from conan.tools.gnu import PkgConfigDeps
pc = PkgConfigDeps(self)
pc.generate()
def build(self):
meson = Meson(self)
meson.configure()
meson.build()
def package(self):
copy(self, "*.hpp", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include"))
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
def package_id(self):
self.info.clear()