This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
forked from SevenTV/chatterino7
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
52 lines (47 loc) · 1.55 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
from conan import ConanFile
from conan.tools.files import copy
from os import path
class Chatterino(ConanFile):
name = "Chatterino"
requires = "boost/1.81.0", "libavif/0.11.1"
settings = "os", "compiler", "build_type", "arch"
default_options = {
"with_benchmark": False,
"with_openssl3": False,
"openssl*:shared": True,
}
options = {
"with_benchmark": [True, False],
# Qt is built with OpenSSL 3 from version 6.5.0 onwards
"with_openssl3": [True, False],
}
generators = "CMakeDeps", "CMakeToolchain"
def requirements(self):
if self.options.get_safe("with_benchmark", False):
self.requires("benchmark/1.7.1")
if self.options.get_safe("with_openssl3", False):
self.requires("openssl/3.1.0")
else:
self.requires("openssl/1.1.1t")
def generate(self):
copy_bin = lambda dep, selector, subdir: copy(
self,
selector,
dep.cpp_info.bindirs[0],
path.join(self.build_folder, subdir),
keep_path=False,
)
for dep in self.dependencies.values():
# macOS
copy_bin(dep, "*.dylib", "bin")
# Windows
copy_bin(dep, "*.dll", "bin")
copy_bin(dep, "*.dll", "Chatterino2") # used in CI
# Linux
copy(
self,
"*.so*",
dep.cpp_info.libdirs[0],
path.join(self.build_folder, "bin"),
keep_path=False,
)