-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
51 lines (43 loc) · 1.38 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
from conans import ConanFile, CMake
from conans import tools
from conans.tools import os_info, SystemPackageTool
import os, sys
import sysconfig
from io import StringIO
class MagnumVRConan(ConanFile):
name = "magnum-vr"
version = "0.1"
description = "Magnum VR Integration"
url = "https://github.com/ulricheck/magnum-vr"
license = "GPL"
short_paths = True
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
requires = (
"magnum/2019.01@camposs/stable",
"corrade/2019.01@camposs/stable",
"openvr/1.6.10@vendor/stable",
)
options = {
"shared": [True, False],
"with_openvr": [True, False],
}
default_options = {
"with_openvr": True,
"shared": True,
}
# all sources are deployed with the package
exports_sources = "modules/*", "package/*", "toolchains/*", "src/*", "CMakeLists.txt"
def configure(self):
if self.options.shared:
self.options["magnum"].shared = True
self.options["corrade"].shared = True
self.options["openvr"].shared = True
def build(self):
cmake = CMake(self)
cmake.verbose = True
cmake.options["BUILD_STATIC"] = not self.options.shared
cmake.options["WITH_OPENVR"] = self.options.with_openvr
cmake.configure()
cmake.build()
cmake.install()