-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinject_cycles.cmake
259 lines (215 loc) · 5.4 KB
/
inject_cycles.cmake
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# VFX platform requirements
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
# Houdini
message(STATUS "HOUDINI_ROOT: ${HOUDINI_ROOT}")
set(HOUDINI_DSOLIB ${HOUDINI_ROOT}/dsolib/)
set(HOUDINI_INCLUDE ${HOUDINI_ROOT}/toolkit/include)
# not every library is being linked
set(CMAKE_BUILD_RPATH ${HOUDINI_ROOT}/dsolib)
set(CMAKE_INSTALL_RPATH ${HOUDINI_ROOT}/dsolib)
# hboost
# override boost searching and inject hboost
macro(find_package)
if(${ARGV0} STREQUAL "OpenJPEG")
message(STATUS "Skipping OpenJPEG")
elseif(${ARGV0} STREQUAL "Boost")
message(STATUS "Skipping Boost")
else()
message(STATUS "Searching package: ${ARGV}")
_find_package(${ARGV})
endif()
endmacro()
find_library(BOOST_FILESYSTEM_LIB
NAMES hboost_filesystem
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
find_library(BOOST_REGEX_LIB
NAMES hboost_regex
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
find_library(BOOST_SYSTEM_LIB
NAMES hboost_system
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(Boost_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(Boost_FILESYSTEM_LIBRARY_DEBUG ${BOOST_FILESYSTEM_LIB})
set(Boost_FILESYSTEM_LIBRARY_RELEASE ${BOOST_FILESYSTEM_LIB})
set(Boost_REGEX_LIBRARY_DEBUG ${BOOST_REGEX_LIB})
set(Boost_REGEX_LIBRARY_RELEASE ${BOOST_REGEX_LIB})
set(Boost_SYSTEM_LIBRARY_DEBUG ${BOOST_SYSTEM_LIB})
set(Boost_SYSTEM_LIBRARY_RELEASE ${BOOST_SYSTEM_LIB})
set(Boost_FOUND TRUE)
# OpenImageIO
find_library(OPENIMAGEIO_LIB
NAMES OpenImageIO_sidefx
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(OPENIMAGEIO_LIBRARY ${OPENIMAGEIO_LIB})
set(OPENIMAGEIO_INCLUDE_DIR ${HOUDINI_INCLUDE})
# OpenEXR
find_library(OPENEXR_HALF_LIB
NAMES Half_sidefx
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
find_library(OPENEXR_IEX_LIB
NAMES Iex_sidefx
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
find_library(OPENEXR_ILMIMF_LIB
NAMES IlmImf_sidefx
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
find_library(OPENEXR_ILMTHREAD_LIB
NAMES IlmThread_sidefx
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
find_library(OPENEXR_IMATH_LIB
NAMES Imath_sidefx
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(OPENEXR_HALF_LIBRARY ${OPENEXR_HALF_LIB})
set(OPENEXR_IEX_LIBRARY ${OPENEXR_IEX_LIB})
set(OPENEXR_ILMIMF_LIBRARY ${OPENEXR_ILMIMF_LIB})
set(OPENEXR_ILMTHREAD_LIBRARY ${OPENEXR_ILMTHREAD_LIB})
set(OPENEXR_IMATH_LIBRARY ${OPENEXR_IMATH_LIB})
set(OPENEXR_ROOT_DIR ${HOUDINI_DSOLIB})
set(OPENEXR_INCLUDE_DIR ${HOUDINI_INCLUDE})
# OpenShadingLanguage
# OpenColorIO
find_path(OPENCOLORIO_HEADER
NAMES OpenColorIO.h
PATHS ${HOUDINI_INCLUDE}/OpenColorIO/
NO_DEFAULT_PATH
)
find_library(OPENCOLORIO_LIB
NAMES OpenColorIO_sidefx
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(OPENCOLORIO_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(OPENCOLORIO_OPENCOLORIO_LIBRARY ${OPENCOLORIO_LIB})
add_definitions(-DOCIO_NAMESPACE=v1_sidefx)
# tiff
find_library(TIFF_LIB
NAMES tiff
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(TIFF_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(TIFF_LIBRARY ${TIFF_LIB})
# png
find_library(PNG_LIB
NAMES png
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(PNG_INCLUDE_DIRS ${HOUDINI_INCLUDE})
set(PNG_PNG_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(PNG_LIBRARY ${PNG_LIB})
# OpenSubdiv
find_library(OSD_OSDGPU_LIB
NAMES osdGPU
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
find_library(OSD_OSDCPU_LIB
NAMES osdCPU
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(OPENSUBDIV_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(OPENSUBDIV_OSDGPU_LIBRARY ${OSD_OSDGPU_LIB})
set(OPENSUBDIV_OSDCPU_LIBRARY ${OSD_OSDCPU_LIB})
# OpenVDB
find_library(OPENVDB_LIB
NAMES openvdb_sesi
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(OPENVDB_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(OPENVDB_LIBRARY ${OPENVDB_LIB})
# blosc
find_library(BLOSC_LIB
NAMES blosc
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(BLOSC_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(BLOSC_LIBRARY ${BLOSC_LIB})
# tbb
find_library(TBB_LIB
NAMES tbb
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(TBB_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(TBB_LIBRARY ${TBB_LIB})
# glew
find_library(GLEW_LIB
NAMES GLEW
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(GLEW_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(GLEW_LIBRARY ${GLEW_LIB})
# jpeg
find_library(JPEG_LIB
NAMES jpeg
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(JPEG_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(JPEG_LIBRARY ${JPEG_LIB})
# libz
find_library(Z_LIB
NAMES z
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(ZLIB_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(ZLIB_LIBRARY ${Z_LIB})
# embree
find_library(EMBREE_LIB
NAMES embree_sidefx
PATHS ${HOUDINI_DSOLIB}
NO_DEFAULT_PATH
REQUIRED
)
set(EMBREE_INCLUDE_DIR ${HOUDINI_INCLUDE})
set(EMBREE_EMBREE3_LIBRARY ${EMBREE_LIB})
set(EMBREE_EMBREE_AVX_LIBRARY ${EMBREE_LIB})
set(EMBREE_EMBREE_AVX2_LIBRARY ${EMBREE_LIB})
set(EMBREE_EMBREE_LEXERS_LIBRARY ${EMBREE_LIB})
set(EMBREE_EMBREE_MATH_LIBRARY ${EMBREE_LIB})
set(EMBREE_EMBREE_SIMD_LIBRARY ${EMBREE_LIB})
set(EMBREE_EMBREE_SYS_LIBRARY ${EMBREE_LIB})
set(EMBREE_EMBREE_TASKING_LIBRARY ${EMBREE_LIB})