-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconanfile.py
More file actions
172 lines (150 loc) · 5.14 KB
/
conanfile.py
File metadata and controls
172 lines (150 loc) · 5.14 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# SPDX-FileCopyrightText: 2024 Howetuft
#
# SPDX-License-Identifier: Apache-2.0
from conan import ConanFile
from conan.tools.cmake import CMakeDeps, CMakeToolchain
from conan.tools.files import save
import os
# Gather here the various dependency versions, for convenience
# (in alphabetic order)
BOOST_VERSION = "1.88.0"
DOXYGEN_VERSION = "1.16.1"
EIGEN_VERSION = "5.0.1"
EMBREE_VERSION = "4.4.0"
FMT_VERSION = "12.1.0"
GLFW_VERSION = "3.4"
IMATH_VERSION = "3.2.1"
IMGUI_VERSION = "1.92.5"
IMGUIFILEDIALOG_VERSION = "0.6.7"
LIBDEFLATE_VERSION = "1.25"
LIBTIFF_VERSION = "4.7.1"
MINIZIP_VERSION = "4.0.7"
NINJA_VERSION = "1.13.2"
NLOHMANN_JSON_VERSION = "3.12.0"
NVRTC_VERSION = "13.1.115"
OCIO_VERSION = "2.5.1"
OIIO_VERSION = "3.1.10.0"
OIDN_VERSION = "2.3.3"
ONETBB_VERSION = "2022.3.0"
OPENEXR_VERSION = "3.4.4"
OPENJPH_VERSION = "0.25.3"
OPENSUBDIV_VERSION = "3.7.0"
OPENVDB_VERSION = "12.1.1"
PYBIND11_VERSION = "3.0.1"
ROBIN_HOOD_HASHING_VERSION = "3.11.5"
SPDLOG_VERSION = "1.17.0"
ZSTD_VERSION = "1.5.7"
class LuxCoreDeps(ConanFile):
name = "luxcoredeps"
# Version should be set by `conan install`
user = "luxcore"
channel = "luxcore"
requires = [
f"openvdb/{OPENVDB_VERSION}",
f"embree/{EMBREE_VERSION}",
f"oidn/{OIDN_VERSION}@luxcore/luxcore",
f"opensubdiv/{OPENSUBDIV_VERSION}",
f"openjph/{OPENJPH_VERSION}",
f"openimageio/{OIIO_VERSION}",
f"imgui/{IMGUI_VERSION}",
f"glfw/{GLFW_VERSION}",
f"imguifiledialog/{IMGUIFILEDIALOG_VERSION}@luxcore/luxcore",
]
settings = "os", "compiler", "build_type", "arch"
def requirements(self):
self.requires(
f"onetbb/{ONETBB_VERSION}",
override=True,
libs=True,
transitive_libs=True,
)
self.requires(
f"libdeflate/{LIBDEFLATE_VERSION}",
force=True,
libs=True,
transitive_libs=True,
)
self.requires(
f"zstd/{ZSTD_VERSION}",
override=True,
libs=True,
transitive_libs=True,
)
self.requires(
f"libtiff/{LIBTIFF_VERSION}",
override=True,
)
self.requires(
f"opencolorio/{OCIO_VERSION}",
force=True,
)
self.requires(
f"openexr/{OPENEXR_VERSION}",
force=True,
)
self.requires(
f"imath/{IMATH_VERSION}",
override=True,
)
self.requires(
f"minizip-ng/{MINIZIP_VERSION}",
override=True,
)
# Fmt default version (10.x) is not compatible with llvm@20 (MacOS)
self.requires(
f"fmt/{FMT_VERSION}",
force=True,
transitive_headers=True,
)
# Header only deps - make them transitive
self.requires(
f"robin-hood-hashing/{ROBIN_HOOD_HASHING_VERSION}",
transitive_headers=True
)
self.requires(f"eigen/{EIGEN_VERSION}", transitive_headers=True)
self.requires(
f"nlohmann_json/{NLOHMANN_JSON_VERSION}",
transitive_headers=True
)
self.requires(f"pybind11/{PYBIND11_VERSION}", transitive_headers=True)
self.requires(f"spdlog/{SPDLOG_VERSION}", transitive_headers=True)
self.requires(
f"boost/{BOOST_VERSION}",
force=True,
transitive_headers=True,
)
# nvrtc
if self.settings.os in ("Linux", "Windows"):
self.requires(f"nvrtc/{NVRTC_VERSION}@luxcore/luxcore")
# LuxCore build requirements
# As they are build requirements for LuxCore, they must be full
# requirements for LuxCoreDeps (otherwise they won't get saved in cache)
# Bison/flex (Luxcore build requirement)
if self.settings.os == "Windows":
self.requires("winflexbison/[*]", build=False, run=True, visible=True)
else:
self.requires("bison/[*]", build=False, run=True, visible=True)
self.requires("flex/[*]", build=False, run=True, visible=True)
# Ninja (Luxcore build requirement)
self.requires("ninja/[*]", build=False, run=True, visible=True)
# Doxygen (Luxcore build requirement)
# Requires also doxygen's deps 'xapian' and 'libiconv', otherwise they
# are downloaded at install in other versions, and that makes Doxygen
# recompile
self.requires(f"doxygen/{DOXYGEN_VERSION}", build=False, run=True, visible=True)
def build_requirements(self):
# LuxCoreDeps build requirements
self.tool_requires("cmake/[*]")
self.tool_requires("meson/[*]")
self.tool_requires("pkgconf/[*]")
self.tool_requires("yasm/[*]")
def generate(self):
tc = CMakeToolchain(self)
if self.settings.os == "Macos" and self.settings.arch == "armv8":
tc.cache_variables["CMAKE_OSX_ARCHITECTURES"] = "arm64"
tc.generate()
cd = CMakeDeps(self)
cd.generate()
def package(self):
# Just to ensure package is not empty
save(self, os.path.join(self.package_folder, "dummy.txt"), "Hello World")