Skip to content

Commit 5332d62

Browse files
sunyabpixar-oss
authored andcommitted
build_usd.py: Remove OpenEXR dependency when building OpenImageIO
OpenImageIO no longer needs to support .exr images, since USD supports that format natively. So we remove OpenEXR from the list of dependencies and explicitly turn off EXR support when building OIIO. (Internal change: 2331174)
1 parent 1b6a1ea commit 5332d62

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

build_scripts/build_usd.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,15 +1260,11 @@ def InstallOpenImageIO(context, force, buildArgs):
12601260
'-DUSE_PYTHON=OFF',
12611261
'-DSTOP_ON_WARNING=OFF']
12621262

1263-
# OIIO's FindOpenEXR module circumvents CMake's normal library
1264-
# search order, which causes versions of OpenEXR installed in
1265-
# /usr/local or other hard-coded locations in the module to
1266-
# take precedence over the version we've built, which would
1267-
# normally be picked up when we specify CMAKE_PREFIX_PATH.
1268-
# This may lead to undefined symbol errors at build or runtime.
1269-
# So, we explicitly specify the OpenEXR we want to use here.
1270-
extraArgs.append('-DOPENEXR_ROOT="{instDir}"'
1271-
.format(instDir=context.instDir))
1263+
# USD natively supports reading .exr files. Disable support in
1264+
# OpenImageIO so we don't need to build OpenEXR as a dependency,
1265+
# and so we don't accidentally pick up an OpenEXR library outside
1266+
# of our build.
1267+
extraArgs.append('-DUSE_OPENEXR=OFF')
12721268

12731269
# If Ptex support is disabled in USD, disable support in OpenImageIO
12741270
# as well. This ensures OIIO doesn't accidentally pick up a Ptex
@@ -2263,7 +2259,7 @@ def ForceBuildDependency(self, dep):
22632259
requiredDependencies += [BLOSC, BOOST, OPENEXR, OPENVDB, TBB]
22642260

22652261
if context.buildOIIO:
2266-
requiredDependencies += [BOOST, JPEG, TIFF, PNG, OPENEXR, OPENIMAGEIO]
2262+
requiredDependencies += [BOOST, JPEG, TIFF, PNG, OPENIMAGEIO]
22672263

22682264
if context.buildOCIO:
22692265
requiredDependencies += [OPENCOLORIO]

0 commit comments

Comments
 (0)