Skip to content

Commit cb646d6

Browse files
authored
Merge pull request #1303 from MrPetru/RV_build
Allow building RV with older version of OIIO
2 parents 2af4df0 + 13ea9ca commit cb646d6

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

SConstruct

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ o.Add(
260260
"",
261261
)
262262

263+
o.Add(
264+
BoolVariable( "WITH_OIIO_UTIL", "Build with OpenImageIO_Util", True ),
265+
)
266+
263267
# Blosc options
264268

265269
o.Add(
@@ -1858,13 +1862,14 @@ imageEnvPrepends = {
18581862
],
18591863
"LIBS" : [
18601864
"OpenImageIO$OIIO_LIB_SUFFIX",
1861-
"OpenImageIO_Util$OIIO_LIB_SUFFIX",
18621865
],
18631866
"CXXFLAGS" : [
18641867
"-DIECoreImage_EXPORTS",
18651868
systemIncludeArgument, "$OIIO_INCLUDE_PATH"
18661869
]
18671870
}
1871+
if imageEnv.get( "WITH_OIIO_UTIL", True ):
1872+
imageEnvPrepends["LIBS"].append( "OpenImageIO_Util$OIIO_LIB_SUFFIX" )
18681873

18691874
imageEnv.Prepend( **imageEnvPrepends )
18701875
# Windows uses PATH for to find libraries, we must append to it to make sure we don't overwrite existing PATH entries.
@@ -2216,11 +2221,12 @@ if env["WITH_GL"] and doConfigure :
22162221
os.path.basename( imageEnv.subst( "$INSTALL_LIB_NAME" ) ),
22172222
os.path.basename( sceneEnv.subst( "$INSTALL_LIB_NAME" ) ),
22182223
"OpenImageIO$OIIO_LIB_SUFFIX",
2219-
"OpenImageIO_Util$OIIO_LIB_SUFFIX",
22202224
"GLEW$GLEW_LIB_SUFFIX",
22212225
"boost_wave$BOOST_LIB_SUFFIX",
22222226
]
22232227
)
2228+
if glEnv.get( "WITH_OIIO_UTIL", True ):
2229+
glEnv.Append( LIBS = [ "OpenImageIO_Util$OIIO_LIB_SUFFIX", ] )
22242230

22252231
if env["PLATFORM"]=="darwin" :
22262232
glEnv.Append(

config/ie/options

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ oiioRoot = os.path.join( "/software", "apps", "OpenImageIO", oiioVersion, platfo
196196
OIIO_INCLUDE_PATH = os.path.join( oiioRoot, "include" )
197197
OIIO_LIB_PATH = os.path.join( oiioRoot, "lib64" )
198198
OIIO_LIB_SUFFIX = IEEnv.BuildUtil.libSuffix( "OpenImageIO", oiioLibSuffix )
199+
WITH_OIIO_UTIL = "true"
199200

200201
FREETYPE_LIB_PATH = os.path.join( "/software", "tools", "lib", platform, compiler, compilerVersion )
201202
FREETYPE_INCLUDE_PATH = "/usr/include/freetype2"
@@ -436,6 +437,9 @@ if targetApp=="rv" :
436437
# the default `OIIO_INCLUDE_PATH` value.
437438
OIIO_LIB_PATH = rvLibs
438439
OIIO_LIB_SUFFIX = rvReg.get( "OpenImageIOLibSuffix", OIIO_LIB_SUFFIX )
440+
# current version of OIIO used by RV doesn't include the Util library
441+
# this variable will tell the build process to not require it
442+
WITH_OIIO_UTIL = rvReg.get( "WithOpenImageIOUtil", WITH_OIIO_UTIL )
439443

440444
# find doxygen
441445
DOXYGEN = os.path.join( "/software/apps/doxygen", os.environ["DOXYGEN_VERSION"], platform, "bin", "doxygen" )

0 commit comments

Comments
 (0)