-
Notifications
You must be signed in to change notification settings - Fork 1
/
conanfile.py
65 lines (59 loc) · 1.86 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
from conan import ConanFile
from conan.tools.files import copy
from os import path
import shutil
class Eventsub(ConanFile):
name = "Eventsub"
requires = [
"boost/[~1.83]",
"openssl/[~3]",
]
settings = "os", "compiler", "build_type", "arch"
default_options = {
"openssl*:shared": True,
"boost*:header_only": True,
}
options = {}
generators = "CMakeDeps", "CMakeToolchain"
def layout(self):
self.cpp.build.libdirs = ["lib"]
self.cpp.build.bindirs = ["bin"]
def requirements(self):
self.output.warning(self.default_options)
def generate(self):
for dep in self.dependencies.values():
try:
# macOS
copy(
self,
"*.dylib",
dep.cpp_info.libdirs[0],
path.join(self.build_folder, self.cpp.build.libdirs[0]),
keep_path=False,
)
# Windows
copy(
self,
"*.lib",
dep.cpp_info.libdirs[0],
path.join(self.build_folder, self.cpp.build.libdirs[0]),
keep_path=False,
)
copy(
self,
"*.dll",
dep.cpp_info.bindirs[0],
path.join(self.build_folder, self.cpp.build.bindirs[0]),
keep_path=False,
)
# Linux
copy(
self,
"*.so*",
dep.cpp_info.libdirs[0],
path.join(self.build_folder, self.cpp.build.libdirs[0]),
keep_path=False,
)
except shutil.SameFileError:
# Ignore 'same file' errors
pass