Skip to content

Commit

Permalink
Drop support for OpenEXR 2
Browse files Browse the repository at this point in the history
  • Loading branch information
murraystevenson committed Apr 19, 2024
1 parent 8669056 commit 3030de0
Show file tree
Hide file tree
Showing 119 changed files with 8 additions and 720 deletions.
29 changes: 1 addition & 28 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -1301,23 +1301,6 @@ if doConfigure :
sys.stderr.write( "ERROR : unable to determine boost version from \"%s\".\n" % boostVersionHeader )
Exit( 1 )

# Figure out the OpenEXR version

exrVersionHeader = env.FindFile( "OpenEXR/OpenEXRConfig.h", dependencyIncludes )
if exrVersionHeader is None :
sys.stderr.write( "ERROR : unable to find `OpenEXR/OpenEXRConfig.h`, check OPENEXR_INCLUDE_PATH.\n" )
Exit( 1 )

exrMajorVersion = None
for line in open( str( exrVersionHeader ) ) :
m = re.match( r'^#define OPENEXR_VERSION_STRING "(\d)\.(\d)\.(\d+)"$', line )
if m :
exrMajorVersion = int( m.group( 1 ) )

if exrMajorVersion is None :
sys.stderr.write( "ERROR : unable to determine OpenEXR version from \"{}\".\n".format( exrVersionHeader ) )
Exit( 1 )

env.Append( LIBS = [
"boost_filesystem" + env["BOOST_LIB_SUFFIX"],
"boost_regex" + env["BOOST_LIB_SUFFIX"],
Expand Down Expand Up @@ -1357,23 +1340,13 @@ if doConfigure :

c.Finish()

if exrMajorVersion >= 3 :
env.Append( LIBS = [ "OpenEXR" + env["OPENEXR_LIB_SUFFIX"] ] )
else :
env.Append(
LIBS = [
"IlmImf" + env["OPENEXR_LIB_SUFFIX"],
# Windows OpenEXR adds version numbers to all libraries except Half.
"Half" + ( env["OPENEXR_LIB_SUFFIX"] if env["PLATFORM"] != "win32" else "" )
]
)

env.Append( LIBS = [
"tbb" + env["TBB_LIB_SUFFIX"],
"blosc" + env["BLOSC_LIB_SUFFIX"],
"Iex" + env["OPENEXR_LIB_SUFFIX"],
"Imath" + env["OPENEXR_LIB_SUFFIX"],
"IlmThread" + env["OPENEXR_LIB_SUFFIX"],
"OpenEXR" + env["OPENEXR_LIB_SUFFIX"],
# Link Windows zlib against static library to avoid potential conflicts
# with system provided version.
"z" if env["PLATFORM"] != "win32" else "zlibstatic"
Expand Down
9 changes: 0 additions & 9 deletions contrib/IECoreUSD/include/IECoreUSD/TypeTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,11 @@ IECORE_PUSH_DEFAULT_VISIBILITY
#include "pxr/base/vt/value.h"
IECORE_POP_DEFAULT_VISIBILITY

#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/half.h"
#include "OpenEXR/ImathColor.h"
#include "OpenEXR/ImathMatrix.h"
#include "OpenEXR/ImathQuat.h"
#include "OpenEXR/ImathVec.h"
#else
#include "Imath/half.h"
#include "Imath/ImathColor.h"
#include "Imath/ImathMatrix.h"
#include "Imath/ImathQuat.h"
#include "Imath/ImathVec.h"
#endif

namespace IECoreUSD
{
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/BezierAlgo.inl
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@

#include "IECore/LineSegment.h"

#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathFun.h"
#else
#include "Imath/ImathFun.h"
#endif

namespace IECore
{
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/BoundedKDTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@
#include "IECore/Export.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathBox.h"
#else
#include "Imath/ImathBox.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#include <vector>
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/BoxAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@
#include "IECore/Export.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathBox.h"
#else
#include "Imath/ImathBox.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#include <iostream>
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/BoxInterpolator.inl
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@
#include "IECore/Export.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathBox.h"
#else
#include "Imath/ImathBox.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

namespace IECore
Expand Down
9 changes: 0 additions & 9 deletions include/IECore/BoxTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,10 @@
#include "IECore/VectorTraits.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathBox.h"
#else
#include "Imath/ImathBox.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathBoxAlgo.h"
#else
#include "Imath/ImathBoxAlgo.h"
#endif

#include "boost/static_assert.hpp"

Expand Down
5 changes: 0 additions & 5 deletions include/IECore/CubicBasis.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@
#include "IECore/Export.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathMatrix.h"
#else
#include "Imath/ImathMatrix.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

namespace IECore
Expand Down
7 changes: 0 additions & 7 deletions include/IECore/DimensionTraits.inl
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,9 @@
#include "IECore/TypeTraits.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathBox.h"
#include "OpenEXR/ImathPlane.h"
#include "OpenEXR/ImathVec.h"
#else
#include "Imath/ImathBox.h"
#include "Imath/ImathPlane.h"
#include "Imath/ImathVec.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#include "boost/static_assert.hpp"
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/HalfTypeTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@
#include "IECore/Export.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/half.h"
#else
#include "Imath/half.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#include "boost/type_traits/is_arithmetic.hpp"
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/IFFFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@
#include "IECore/RefCounted.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathVec.h"
#else
#include "Imath/ImathVec.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#include <fstream>
Expand Down
10 changes: 0 additions & 10 deletions include/IECore/ImathHash.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,12 @@
#define IE_CORE_IMATHHASH_H

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/half.h"
#include "OpenEXR/ImathBox.h"
#include "OpenEXR/ImathColor.h"
#include "OpenEXR/ImathMatrix.h"
#include "OpenEXR/ImathQuat.h"
#include "OpenEXR/ImathVec.h"
#else
#include "Imath/half.h"
#include "Imath/ImathBox.h"
#include "Imath/ImathColor.h"
#include "Imath/ImathMatrix.h"
#include "Imath/ImathQuat.h"
#include "Imath/ImathVec.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

namespace IECore
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/ImathRandAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@
#ifndef IE_CORE_IMATHRANDADAPTER_H
#define IE_CORE_IMATHRANDADAPTER_H

#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathRandom.h"
#else
#include "Imath/ImathRandom.h"
#endif

namespace IECore
{
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/IndexedIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@
#include "IECore/RunTimeTyped.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/half.h"
#else
#include "Imath/half.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#include <map>
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/KDTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@
#include "IECore/VectorTraits.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathVec.h"
#else
#include "Imath/ImathVec.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#include <set>
Expand Down
6 changes: 0 additions & 6 deletions include/IECore/LineSegment.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,8 @@
#include "IECore/VectorTraits.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathPlane.h"
#include "OpenEXR/ImathVec.h"
#else
#include "Imath/ImathPlane.h"
#include "Imath/ImathVec.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

namespace IECore
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/LineSegment.inl
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@
#ifndef IECORE_LINESEGMENT_INL
#define IECORE_LINESEGMENT_INL

#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathFun.h"
#else
#include "Imath/ImathFun.h"
#endif

namespace IECore
{
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/Lookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@
#include "IECore/Export.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathColor.h"
#else
#include "Imath/ImathColor.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#include "boost/function.hpp"
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/Lookup.inl
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@

#include "IECore/FastFloat.h"

#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathFun.h"
#else
#include "Imath/ImathFun.h"
#endif

namespace IECore
{
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/MatrixAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@
#include "IECore/Export.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathMatrix.h"
#else
#include "Imath/ImathMatrix.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

namespace IECore
Expand Down
10 changes: 0 additions & 10 deletions include/IECore/MatrixInterpolator.inl
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,11 @@
#include "IECore/Export.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathMatrix.h"
#include "OpenEXR/ImathVec.h"
#else
#include "Imath/ImathMatrix.h"
#include "Imath/ImathVec.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathMatrixAlgo.h"
#else
#include "Imath/ImathMatrixAlgo.h"
#endif

namespace IECore
{
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/MatrixTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@
#include "IECore/Export.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathMatrix.h"
#else
#include "Imath/ImathMatrix.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#include <cassert>
Expand Down
10 changes: 0 additions & 10 deletions include/IECore/MurmurHash.inl
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,12 @@
#include "IECore/InternedString.h"

IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/ImathBox.h"
#include "OpenEXR/ImathColor.h"
#include "OpenEXR/ImathMatrix.h"
#include "OpenEXR/ImathQuat.h"
#include "OpenEXR/ImathVec.h"
#include "OpenEXR/ImathEuler.h"
#else
#include "Imath/ImathBox.h"
#include "Imath/ImathColor.h"
#include "Imath/ImathMatrix.h"
#include "Imath/ImathQuat.h"
#include "Imath/ImathVec.h"
#include "Imath/ImathEuler.h"
#endif
IECORE_POP_DEFAULT_VISIBILITY

#include <vector>
Expand Down
5 changes: 0 additions & 5 deletions include/IECore/NumericParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@
#include "IECore/Parameter.h"
#include "IECore/TypedData.h"

#include "OpenEXR/OpenEXRConfig.h"
#if OPENEXR_VERSION_MAJOR < 3
#include "OpenEXR/half.h"
#else
#include "Imath/half.h"
#endif

namespace IECore
{
Expand Down
Loading

0 comments on commit 3030de0

Please sign in to comment.