-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
conanfile.py
50 lines (38 loc) · 1.61 KB
/
conanfile.py
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
43
44
45
46
47
48
49
50
from conan import ConanFile
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy
from conan.tools.build import check_min_cppstd
from conan.tools.layout import basic_layout
import os
required_conan_version = ">=1.52.0"
class SoleConan(ConanFile):
name = "sole"
description = "Sole is a lightweight C++11 library to generate universally unique identificators (UUID), both v1 and v4."
license = "Zlib"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/r-lyeh-archived/sole"
topics = ("uuid", "header-only")
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
def export_sources(self):
export_conandata_patches(self)
def layout(self):
basic_layout(self, src_folder="src")
def package_id(self):
self.info.clear()
def validate(self):
if self.settings.compiler.cppstd:
check_min_cppstd(self, 11)
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
def build(self):
apply_conandata_patches(self)
def package(self):
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
copy(self, "*.hpp", self.source_folder, os.path.join(self.package_folder, "include"))
def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.frameworkdirs = []
self.cpp_info.libdirs = []
self.cpp_info.resdirs = []
if self.settings.os in ("FreeBSD", "Linux"):
self.cpp_info.system_libs.append("rt")