# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) Contributors to the OpenEXR Project. load("//:bazel/third_party/generate_header.bzl", "generate_header") config_setting( name = "windows_x86_64", values = {"cpu": "x64_windows"}, visibility = ["//visibility:public"], ) generate_header( name = "IexConfig.h", substitutions = { "@IEX_INTERNAL_NAMESPACE@": "Iex_3_0", "@IEX_NAMESPACE_CUSTOM@": "0", "@IEX_NAMESPACE@": "Iex", }, template = "cmake/IexConfig.h.in", ) generate_header( name = "IexConfigInternal.h", substitutions = { "#cmakedefine HAVE_UCONTEXT_H 1": "/* #undef HAVE_UCONTEXT_H */", "#cmakedefine IEX_HAVE_CONTROL_REGISTER_SUPPORT 1": "/* #undef IEX_HAVE_CONTROL_REGISTER_SUPPORT */", "#cmakedefine IEX_HAVE_SIGCONTEXT_CONTROL_REGISTER_SUPPORT 1": "/* #undef IEX_HAVE_SIGCONTEXT_CONTROL_REGISTER_SUPPORT */", }, template = "cmake/IexConfigInternal.h.in", ) generate_header( name = "IlmThreadConfig.h", substitutions = { "@ILMTHREAD_INTERNAL_NAMESPACE@": "IlmThread_3_0", "@ILMTHREAD_NAMESPACE_CUSTOM@": "0", "@ILMTHREAD_NAMESPACE@": "IlmThread", "#cmakedefine01 ILMTHREAD_HAVE_POSIX_SEMAPHORES": "#define ILMTHREAD_HAVE_POSIX_SEMAPHORES 0", "#cmakedefine01 ILMTHREAD_THREADING_ENABLED": "#define ILMTHREAD_THREADING_ENABLED 1", }, template = "cmake/IlmThreadConfig.h.in", ) generate_header( name = "OpenEXRConfig.h", substitutions = { "@OPENEXR_IMF_NAMESPACE@": "Imf", "@OPENEXR_INTERNAL_IMF_NAMESPACE@": "Imf_3_0", "@OPENEXR_LIB_VERSION@": "3.0.1", "@OPENEXR_NAMESPACE_CUSTOM@": "0", "@OPENEXR_PACKAGE_NAME@": "OpenEXR 3.0.1", "@OPENEXR_VERSION_EXTRA@": "", "@OPENEXR_VERSION_MAJOR@": "3", "@OPENEXR_VERSION_MINOR@": "0", "@OPENEXR_VERSION_PATCH@": "1", "@OPENEXR_VERSION@": "3.0.1", "#cmakedefine OPENEXR_ENABLE_API_VISIBILITY": "#define OPENEXR_ENABLE_API_VISIBILITY", "#cmakedefine OPENEXR_HAVE_LARGE_STACK 1": "/* #undef OPENEXR_HAVE_LARGE_STACK */", }, template = "cmake/OpenEXRConfig.h.in", ) generate_header( name = "OpenEXRConfigInternal.h", substitutions = { "#cmakedefine OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1": "#define OPENEXR_IMF_HAVE_COMPLETE_IOMANIP 1", "#cmakedefine OPENEXR_IMF_HAVE_DARWIN 1": "/* #undef OPENEXR_IMF_HAVE_DARWIN */", "#cmakedefine OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX 1": "/* #undef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX */", "#cmakedefine OPENEXR_IMF_HAVE_LINUX_PROCFS 1": "/* #undef OPENEXR_IMF_HAVE_LINUX_PROCFS */", "#cmakedefine OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN 1": "/* #undef OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN */", }, template = "cmake/OpenEXRConfigInternal.h.in", ) cc_library( name = "Iex", srcs = [ "src/lib/Iex/IexBaseExc.cpp", "src/lib/Iex/IexMathFloatExc.cpp", "src/lib/Iex/IexMathFpu.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/IexMathFloatExc.h", "src/lib/Iex/IexMathFpu.h", "src/lib/Iex/IexMathIeeeExc.h", "src/lib/Iex/IexNamespace.h", "src/lib/Iex/IexThrowErrnoExc.h", ], includes = ["src/lib/Iex"], deps = [ ":IexConfig.h", ":IexConfigInternal.h", ":OpenEXRConfig.h", ], ) 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", ":IlmThreadConfig.h", ], ) 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 = [ ":IexConfig.h", ":IexConfigInternal.h", ":IlmThread", ":IlmThreadConfig.h", ":OpenEXRConfig.h", ":OpenEXRConfigInternal.h", "@Imath", "@zlib", ], )