-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathconanfile.py
More file actions
58 lines (47 loc) · 1.18 KB
/
conanfile.py
File metadata and controls
58 lines (47 loc) · 1.18 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
class pkgRecipe(ConanFile):
name = "source2gen"
version = "0.0.0"
package_type = "application"
requires = [
"abseil/20240722.0",
"argparse/3.2",
"gtest/1.15.0",
]
options = {
"game": [
"CS2",
"DOTA2",
"SBOX",
"ARTIFACT2",
"ARTIFACT1",
"UNDERLORDS",
"DESKJOB",
"HL_ALYX",
"THE_LAB_ROBOT_REPAIR",
"DEADLOCK",
],
}
default_options = {
"game": "CS2",
}
settings = "os", "compiler", "build_type", "arch"
exports_sources = "CMakeLists.txt", "source2gen/*"
def layout(self):
cmake_layout(self)
def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self)
tc.generate()
def build(self):
variables = {
"SOURCE2GEN_GAME": self.options.game,
}
cmake = CMake(self)
cmake.configure(variables=variables)
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()