-
Notifications
You must be signed in to change notification settings - Fork 178
/
conanfile.py
50 lines (43 loc) · 1.89 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
import os
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMakeDeps
from conan.tools.files import copy
class RoR(ConanFile):
name = "Rigs of Rods"
settings = "os", "compiler", "build_type", "arch"
def layout(self):
self.folders.generators = os.path.join(self.folders.build, "generators")
def requirements(self):
self.requires("angelscript/2.35.1")
self.requires("discord-rpc/3.4.0@anotherfoxguy/stable")
self.requires("libcurl/8.2.1")
self.requires("fmt/10.1.1")
self.requires("mygui/3.4.0@anotherfoxguy/stable")
self.requires("ogre3d-caelum/0.6.3.1@anotherfoxguy/stable")
self.requires("ogre3d-pagedgeometry/1.2.2-ror@anotherfoxguy/stable")
self.requires("ogre3d/1.11.6.1@anotherfoxguy/stable", force=True)
self.requires("ois/1.4.1@rigsofrods/custom")
self.requires("openal-soft/1.22.2")
self.requires("openssl/3.1.2", force=True)
self.requires("rapidjson/cci.20211112", force=True)
self.requires("socketw/3.11.0@anotherfoxguy/stable")
self.requires("libpng/1.6.39", override=True)
self.requires("libwebp/1.3.2", override=True)
self.requires("zlib/1.2.13", override=True)
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
deps = CMakeDeps(self)
deps.generate()
if self.settings.os == "Windows" and self.settings.build_type == "Release":
deps.configuration = "RelWithDebInfo"
deps.generate()
for dep in self.dependencies.values():
for f in dep.cpp_info.bindirs:
self.cp_data(f)
for f in dep.cpp_info.libdirs:
self.cp_data(f)
def cp_data(self, src):
bindir = os.path.join(self.build_folder, "bin")
copy(self, "*.dll", src, bindir, False)
copy(self, "*.so*", src, bindir, False)