forked from AcademySoftwareFoundation/openexr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
476 lines (431 loc) · 16 KB
/
BUILD.bazel
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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenEXR Project.
config_setting(
name = "windows_x86_64",
values = {"cpu": "x64_windows"},
visibility = ["//visibility:public"],
)
# generate "IlmBaseConfig.h"
ILM_BASE_CONFIG_H = """
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenEXR Project.
// This file is auto-generated by the cmake configure step
#ifndef INCLUDED_ILMBASE_CONFIG_H
#define INCLUDED_ILMBASE_CONFIG_H 1
#pragma once
//
// Options / configuration based on O.S. / compiler
/////////////////////
#define ILMBASE_THREADING_ENABLED 1
#define ILMBASE_HAVE_POSIX_SEMAPHORES 0
//////////////////////
//
// C++ namespace configuration / options
// Current (internal) library namepace name and corresponding public
// client namespaces.
#define ILMBASE_INTERNAL_NAMESPACE_CUSTOM 0
#define IEX_INTERNAL_NAMESPACE Iex_
#define ILMTHREAD_INTERNAL_NAMESPACE IlmThread_
#define ILMBASE_NAMESPACE_CUSTOM 0
#define IEX_NAMESPACE Iex
#define ILMTHREAD_NAMESPACE IlmThread
//
// Version information
//
#define ILMBASE_VERSION_STRING "2.5.99"
#define ILMBASE_PACKAGE_STRING "IlmBase "
#define ILMBASE_VERSION_MAJOR 2
#define ILMBASE_VERSION_MINOR 5
#define ILMBASE_VERSION_PATCH 99
#define ILMBASE_VERSION_HEX ((uint32_t(ILMBASE_VERSION_MAJOR) << 24) | \
(uint32_t(ILMBASE_VERSION_MINOR) << 16) | \
(uint32_t(ILMBASE_VERSION_PATCH) << 8))
#if defined(__cplusplus) && (__cplusplus >= 201402L)
# define ILMBASE_DEPRECATED(msg) [[deprecated(msg)]]
#endif
#ifndef ILMBASE_DEPRECATED
# ifdef _MSC_VER
# define ILMBASE_DEPRECATED(msg) __declspec(deprecated(msg))
# else
# define ILMBASE_DEPRECATED(msg) __attribute__((deprecated(msg)))
# endif
#endif
#endif // INCLUDED_ILMBASE_CONFIG_H
"""
genrule(
name = "generate_IlmBaseConfig_h",
outs = ["//:config/IlmBaseConfig.h"],
cmd = ("echo '%s' > $(OUTS)" % ILM_BASE_CONFIG_H),
visibility = ["//visibility:private"],
)
cc_library(
name = "ilm_base_config",
srcs = [],
hdrs = ["//:config/IlmBaseConfig.h"],
includes = ["config"],
visibility = ["//visibility:public"],
)
# generate "OpenEXRConfig.h"
OPEN_EXR_CONFIG_H = """
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenEXR Project.
// This file is auto-generated by the configure step
#ifndef INCLUDED_OPENEXR_CONFIG_H
#define INCLUDED_OPENEXR_CONFIG_H 1
#pragma once
//
// Options / configuration based on O.S. / compiler
/////////////////////
//
// Define and set to 1 if the target system has support for large
// stack sizes.
//
/* #undef OPENEXR_HAVE_LARGE_STACK */
//////////////////////
//
// C++ namespace configuration / options
//
// Current internal library namepace name
//
#define OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM 0
#define OPENEXR_IMF_INTERNAL_NAMESPACE Imf_2_5
//
// Current public user namepace name
//
#define OPENEXR_IMF_NAMESPACE_CUSTOM 0
#define OPENEXR_IMF_NAMESPACE Imf
//
// Version string for runtime access
//
#define OPENEXR_VERSION_STRING "2.5.99"
#define OPENEXR_PACKAGE_STRING "OpenEXR 2.5.99"
#define OPENEXR_VERSION_MAJOR 2
#define OPENEXR_VERSION_MINOR 5
#define OPENEXR_VERSION_PATCH 99
#define OPENEXR_VERSION_EXTRA ""
// Version as a single hex number, e.g. 0x01000300 == 1.0.3
#define OPENEXR_VERSION_HEX ((uint32_t(OPENEXR_VERSION_MAJOR) << 24) | \
(uint32_t(OPENEXR_VERSION_MINOR) << 16) | \
(uint32_t(OPENEXR_VERSION_PATCH) << 8))
#endif // INCLUDED_OPENEXR_CONFIG_H
"""
genrule(
name = "generate_OpenEXRConfig_h",
outs = ["//:config/OpenEXRConfig.h"],
cmd = ("echo '%s' > $(OUTS)" % OPEN_EXR_CONFIG_H),
visibility = ["//visibility:private"],
)
cc_library(
name = "openexr_config",
srcs = [],
hdrs = ["//:config/OpenEXRConfig.h"],
includes = ["config"],
visibility = ["//visibility:public"],
)
# generate "OpenEXRConfigInternal.h"
OPENEXRCONFIGINTERNAL_H = """
// SPDX-License-Identifier: BSD-3-Clause
// Copyright Contributors to the OpenEXR Project.
// This file is auto-generated by the configure step
#ifndef INCLUDED_OPENEXR_INTERNAL_CONFIG_H
#define INCLUDED_OPENEXR_INTERNAL_CONFIG_H 1
#pragma once
#define OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1
#endif // INCLUDED_OPENEXR_INTERNAL_CONFIG_H
"""
genrule(
name = "generate_OpenEXRConfigInternal_h",
outs = ["//:config/OpenEXRConfigInternal.h"],
cmd = ("echo '%s' > $(OUTS)" % OPENEXRCONFIGINTERNAL_H),
visibility = ["//visibility:private"],
)
cc_library(
name = "openexr_config_internal",
srcs = [],
hdrs = ["//:config/OpenEXRConfigInternal.h"],
includes = ["config"],
visibility = ["//visibility:public"],
)
cc_library(
name = "Iex",
srcs = [
"src/lib/Iex/IexBaseExc.cpp",
"src/lib/Iex/IexThrowErrnoExc.cpp",
],
hdrs = [
"src/lib/Iex/Iex.h",
"src/lib/Iex/IexBaseExc.h",
"src/lib/Iex/IexErrnoExc.h",
"src/lib/Iex/IexExport.h",
"src/lib/Iex/IexForward.h",
"src/lib/Iex/IexMacros.h",
"src/lib/Iex/IexMathExc.h",
"src/lib/Iex/IexNamespace.h",
"src/lib/Iex/IexThrowErrnoExc.h",
],
includes = ["src/lib/Iex"],
deps = [":ilm_base_config"],
)
cc_library(
name = "IlmThread",
srcs = [
"src/lib/IlmThread/IlmThread.cpp",
"src/lib/IlmThread/IlmThreadPool.cpp",
"src/lib/IlmThread/IlmThreadSemaphore.cpp",
"src/lib/IlmThread/IlmThreadSemaphoreOSX.cpp",
"src/lib/IlmThread/IlmThreadSemaphorePosix.cpp",
"src/lib/IlmThread/IlmThreadSemaphorePosixCompat.cpp",
"src/lib/IlmThread/IlmThreadSemaphoreWin32.cpp",
],
hdrs = [
"src/lib/IlmThread/IlmThread.h",
"src/lib/IlmThread/IlmThreadExport.h",
"src/lib/IlmThread/IlmThreadForward.h",
"src/lib/IlmThread/IlmThreadMutex.h",
"src/lib/IlmThread/IlmThreadNamespace.h",
"src/lib/IlmThread/IlmThreadPool.h",
"src/lib/IlmThread/IlmThreadSemaphore.h",
],
includes = ["src/lib/IlmThread"],
deps = [
":Iex",
":ilm_base_config",
],
)
cc_library(
name = "OpenEXR",
srcs = [
"src/lib/OpenEXR/ImfAcesFile.cpp",
"src/lib/OpenEXR/ImfAttribute.cpp",
"src/lib/OpenEXR/ImfB44Compressor.cpp",
"src/lib/OpenEXR/ImfBoxAttribute.cpp",
"src/lib/OpenEXR/ImfCRgbaFile.cpp",
"src/lib/OpenEXR/ImfChannelList.cpp",
"src/lib/OpenEXR/ImfChannelListAttribute.cpp",
"src/lib/OpenEXR/ImfChromaticities.cpp",
"src/lib/OpenEXR/ImfChromaticitiesAttribute.cpp",
"src/lib/OpenEXR/ImfCompositeDeepScanLine.cpp",
"src/lib/OpenEXR/ImfCompressionAttribute.cpp",
"src/lib/OpenEXR/ImfCompressor.cpp",
"src/lib/OpenEXR/ImfConvert.cpp",
"src/lib/OpenEXR/ImfDeepCompositing.cpp",
"src/lib/OpenEXR/ImfDeepFrameBuffer.cpp",
"src/lib/OpenEXR/ImfDeepImageStateAttribute.cpp",
"src/lib/OpenEXR/ImfDeepScanLineInputFile.cpp",
"src/lib/OpenEXR/ImfDeepScanLineInputPart.cpp",
"src/lib/OpenEXR/ImfDeepScanLineOutputFile.cpp",
"src/lib/OpenEXR/ImfDeepScanLineOutputPart.cpp",
"src/lib/OpenEXR/ImfDeepTiledInputFile.cpp",
"src/lib/OpenEXR/ImfDeepTiledInputPart.cpp",
"src/lib/OpenEXR/ImfDeepTiledOutputFile.cpp",
"src/lib/OpenEXR/ImfDeepTiledOutputPart.cpp",
"src/lib/OpenEXR/ImfDoubleAttribute.cpp",
"src/lib/OpenEXR/ImfDwaCompressor.cpp",
"src/lib/OpenEXR/ImfEnvmap.cpp",
"src/lib/OpenEXR/ImfEnvmapAttribute.cpp",
"src/lib/OpenEXR/ImfFastHuf.cpp",
"src/lib/OpenEXR/ImfFloatAttribute.cpp",
"src/lib/OpenEXR/ImfFloatVectorAttribute.cpp",
"src/lib/OpenEXR/ImfFrameBuffer.cpp",
"src/lib/OpenEXR/ImfFramesPerSecond.cpp",
"src/lib/OpenEXR/ImfGenericInputFile.cpp",
"src/lib/OpenEXR/ImfGenericOutputFile.cpp",
"src/lib/OpenEXR/ImfHeader.cpp",
"src/lib/OpenEXR/ImfHuf.cpp",
"src/lib/OpenEXR/ImfIDManifest.cpp",
"src/lib/OpenEXR/ImfIDManifestAttribute.cpp",
"src/lib/OpenEXR/ImfIO.cpp",
"src/lib/OpenEXR/ImfInputFile.cpp",
"src/lib/OpenEXR/ImfInputPart.cpp",
"src/lib/OpenEXR/ImfInputPartData.cpp",
"src/lib/OpenEXR/ImfIntAttribute.cpp",
"src/lib/OpenEXR/ImfKeyCode.cpp",
"src/lib/OpenEXR/ImfKeyCodeAttribute.cpp",
"src/lib/OpenEXR/ImfLineOrderAttribute.cpp",
"src/lib/OpenEXR/ImfLut.cpp",
"src/lib/OpenEXR/ImfMatrixAttribute.cpp",
"src/lib/OpenEXR/ImfMisc.cpp",
"src/lib/OpenEXR/ImfMultiPartInputFile.cpp",
"src/lib/OpenEXR/ImfMultiPartOutputFile.cpp",
"src/lib/OpenEXR/ImfMultiView.cpp",
"src/lib/OpenEXR/ImfOpaqueAttribute.cpp",
"src/lib/OpenEXR/ImfOutputFile.cpp",
"src/lib/OpenEXR/ImfOutputPart.cpp",
"src/lib/OpenEXR/ImfOutputPartData.cpp",
"src/lib/OpenEXR/ImfPartType.cpp",
"src/lib/OpenEXR/ImfPizCompressor.cpp",
"src/lib/OpenEXR/ImfPreviewImage.cpp",
"src/lib/OpenEXR/ImfPreviewImageAttribute.cpp",
"src/lib/OpenEXR/ImfPxr24Compressor.cpp",
"src/lib/OpenEXR/ImfRational.cpp",
"src/lib/OpenEXR/ImfRationalAttribute.cpp",
"src/lib/OpenEXR/ImfRgbaFile.cpp",
"src/lib/OpenEXR/ImfRgbaYca.cpp",
"src/lib/OpenEXR/ImfRle.cpp",
"src/lib/OpenEXR/ImfRleCompressor.cpp",
"src/lib/OpenEXR/ImfScanLineInputFile.cpp",
"src/lib/OpenEXR/ImfStandardAttributes.cpp",
"src/lib/OpenEXR/ImfStdIO.cpp",
"src/lib/OpenEXR/ImfStringAttribute.cpp",
"src/lib/OpenEXR/ImfStringVectorAttribute.cpp",
"src/lib/OpenEXR/ImfSystemSpecific.cpp",
"src/lib/OpenEXR/ImfTestFile.cpp",
"src/lib/OpenEXR/ImfThreading.cpp",
"src/lib/OpenEXR/ImfTileDescriptionAttribute.cpp",
"src/lib/OpenEXR/ImfTileOffsets.cpp",
"src/lib/OpenEXR/ImfTiledInputFile.cpp",
"src/lib/OpenEXR/ImfTiledInputPart.cpp",
"src/lib/OpenEXR/ImfTiledMisc.cpp",
"src/lib/OpenEXR/ImfTiledOutputFile.cpp",
"src/lib/OpenEXR/ImfTiledOutputPart.cpp",
"src/lib/OpenEXR/ImfTiledRgbaFile.cpp",
"src/lib/OpenEXR/ImfTimeCode.cpp",
"src/lib/OpenEXR/ImfTimeCodeAttribute.cpp",
"src/lib/OpenEXR/ImfVecAttribute.cpp",
"src/lib/OpenEXR/ImfVersion.cpp",
"src/lib/OpenEXR/ImfWav.cpp",
"src/lib/OpenEXR/ImfZip.cpp",
"src/lib/OpenEXR/ImfZipCompressor.cpp",
"src/lib/OpenEXR/b44ExpLogTable.h",
"src/lib/OpenEXR/dwaLookups.h",
],
hdrs = [
"src/lib/OpenEXR/ImfAcesFile.h",
"src/lib/OpenEXR/ImfArray.h",
"src/lib/OpenEXR/ImfAttribute.h",
"src/lib/OpenEXR/ImfAutoArray.h",
"src/lib/OpenEXR/ImfB44Compressor.h",
"src/lib/OpenEXR/ImfBoxAttribute.h",
"src/lib/OpenEXR/ImfCRgbaFile.h",
"src/lib/OpenEXR/ImfChannelList.h",
"src/lib/OpenEXR/ImfChannelListAttribute.h",
"src/lib/OpenEXR/ImfCheckedArithmetic.h",
"src/lib/OpenEXR/ImfChromaticities.h",
"src/lib/OpenEXR/ImfChromaticitiesAttribute.h",
"src/lib/OpenEXR/ImfCompositeDeepScanLine.h",
"src/lib/OpenEXR/ImfCompression.h",
"src/lib/OpenEXR/ImfCompressionAttribute.h",
"src/lib/OpenEXR/ImfCompressor.h",
"src/lib/OpenEXR/ImfConvert.h",
"src/lib/OpenEXR/ImfDeepCompositing.h",
"src/lib/OpenEXR/ImfDeepFrameBuffer.h",
"src/lib/OpenEXR/ImfDeepImageState.h",
"src/lib/OpenEXR/ImfDeepImageStateAttribute.h",
"src/lib/OpenEXR/ImfDeepScanLineInputFile.h",
"src/lib/OpenEXR/ImfDeepScanLineInputPart.h",
"src/lib/OpenEXR/ImfDeepScanLineOutputFile.h",
"src/lib/OpenEXR/ImfDeepScanLineOutputPart.h",
"src/lib/OpenEXR/ImfDeepTiledInputFile.h",
"src/lib/OpenEXR/ImfDeepTiledInputPart.h",
"src/lib/OpenEXR/ImfDeepTiledOutputFile.h",
"src/lib/OpenEXR/ImfDeepTiledOutputPart.h",
"src/lib/OpenEXR/ImfDoubleAttribute.h",
"src/lib/OpenEXR/ImfDwaCompressor.h",
"src/lib/OpenEXR/ImfDwaCompressorSimd.h",
"src/lib/OpenEXR/ImfEnvmap.h",
"src/lib/OpenEXR/ImfEnvmapAttribute.h",
"src/lib/OpenEXR/ImfExport.h",
"src/lib/OpenEXR/ImfFastHuf.h",
"src/lib/OpenEXR/ImfFloatAttribute.h",
"src/lib/OpenEXR/ImfFloatVectorAttribute.h",
"src/lib/OpenEXR/ImfForward.h",
"src/lib/OpenEXR/ImfFrameBuffer.h",
"src/lib/OpenEXR/ImfFramesPerSecond.h",
"src/lib/OpenEXR/ImfGenericInputFile.h",
"src/lib/OpenEXR/ImfGenericOutputFile.h",
"src/lib/OpenEXR/ImfHeader.h",
"src/lib/OpenEXR/ImfHuf.h",
"src/lib/OpenEXR/ImfIDManifest.h",
"src/lib/OpenEXR/ImfIDManifestAttribute.h",
"src/lib/OpenEXR/ImfIO.h",
"src/lib/OpenEXR/ImfInputFile.h",
"src/lib/OpenEXR/ImfInputPart.h",
"src/lib/OpenEXR/ImfInputPartData.h",
"src/lib/OpenEXR/ImfInputStreamMutex.h",
"src/lib/OpenEXR/ImfInt64.h",
"src/lib/OpenEXR/ImfIntAttribute.h",
"src/lib/OpenEXR/ImfKeyCode.h",
"src/lib/OpenEXR/ImfKeyCodeAttribute.h",
"src/lib/OpenEXR/ImfLineOrder.h",
"src/lib/OpenEXR/ImfLineOrderAttribute.h",
"src/lib/OpenEXR/ImfLut.h",
"src/lib/OpenEXR/ImfMatrixAttribute.h",
"src/lib/OpenEXR/ImfMisc.h",
"src/lib/OpenEXR/ImfMultiPartInputFile.h",
"src/lib/OpenEXR/ImfMultiPartOutputFile.h",
"src/lib/OpenEXR/ImfMultiView.h",
"src/lib/OpenEXR/ImfName.h",
"src/lib/OpenEXR/ImfNamespace.h",
"src/lib/OpenEXR/ImfOpaqueAttribute.h",
"src/lib/OpenEXR/ImfOptimizedPixelReading.h",
"src/lib/OpenEXR/ImfOutputFile.h",
"src/lib/OpenEXR/ImfOutputPart.h",
"src/lib/OpenEXR/ImfOutputPartData.h",
"src/lib/OpenEXR/ImfOutputStreamMutex.h",
"src/lib/OpenEXR/ImfPartHelper.h",
"src/lib/OpenEXR/ImfPartType.h",
"src/lib/OpenEXR/ImfPixelType.h",
"src/lib/OpenEXR/ImfPizCompressor.h",
"src/lib/OpenEXR/ImfPreviewImage.h",
"src/lib/OpenEXR/ImfPreviewImageAttribute.h",
"src/lib/OpenEXR/ImfPxr24Compressor.h",
"src/lib/OpenEXR/ImfRational.h",
"src/lib/OpenEXR/ImfRationalAttribute.h",
"src/lib/OpenEXR/ImfRgba.h",
"src/lib/OpenEXR/ImfRgbaFile.h",
"src/lib/OpenEXR/ImfRgbaYca.h",
"src/lib/OpenEXR/ImfRle.h",
"src/lib/OpenEXR/ImfRleCompressor.h",
"src/lib/OpenEXR/ImfScanLineInputFile.h",
"src/lib/OpenEXR/ImfSimd.h",
"src/lib/OpenEXR/ImfStandardAttributes.h",
"src/lib/OpenEXR/ImfStdIO.h",
"src/lib/OpenEXR/ImfStringAttribute.h",
"src/lib/OpenEXR/ImfStringVectorAttribute.h",
"src/lib/OpenEXR/ImfSystemSpecific.h",
"src/lib/OpenEXR/ImfTestFile.h",
"src/lib/OpenEXR/ImfThreading.h",
"src/lib/OpenEXR/ImfTileDescription.h",
"src/lib/OpenEXR/ImfTileDescriptionAttribute.h",
"src/lib/OpenEXR/ImfTileOffsets.h",
"src/lib/OpenEXR/ImfTiledInputFile.h",
"src/lib/OpenEXR/ImfTiledInputPart.h",
"src/lib/OpenEXR/ImfTiledMisc.h",
"src/lib/OpenEXR/ImfTiledOutputFile.h",
"src/lib/OpenEXR/ImfTiledOutputPart.h",
"src/lib/OpenEXR/ImfTiledRgbaFile.h",
"src/lib/OpenEXR/ImfTimeCode.h",
"src/lib/OpenEXR/ImfTimeCodeAttribute.h",
"src/lib/OpenEXR/ImfVecAttribute.h",
"src/lib/OpenEXR/ImfVersion.h",
"src/lib/OpenEXR/ImfWav.h",
"src/lib/OpenEXR/ImfXdr.h",
"src/lib/OpenEXR/ImfZip.h",
"src/lib/OpenEXR/ImfZipCompressor.h",
],
copts = select({
":windows_x86_64": [],
"//conditions:default": [
"-Wno-error",
],
}),
includes = ["src/lib/OpenEXR"],
linkopts =
select({
":windows_x86_64": [],
"//conditions:default": [
#"-ldl",
"-lpthread",
#"-lrt",
],
}),
visibility = ["//visibility:public"],
deps = [
":IlmThread",
":ilm_base_config",
":openexr_config",
":openexr_config_internal",
"@Imath",
"@zlib",
],
)