From e9f72cb45a81976d3ac1615e356107cebb7e8fe1 Mon Sep 17 00:00:00 2001 From: Daniel Dresser Date: Mon, 26 Jun 2023 16:00:11 -0700 Subject: [PATCH] Allow IE to build with monolithic USD --- SConstruct | 9 ++++++++- config/ie/options | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index cd5b3dcca70..2d585a9ae50 100644 --- a/SConstruct +++ b/SConstruct @@ -297,6 +297,13 @@ options.Add( "usd_" ) +options.Add( + "USD_LIB_SUFFIXES", + "The suffixes to append to the names of the USD libraries. You can modify this " + "to \"usd_ms\" to use a monolithic build of USD. ", + "sdf arch tf vt" +) + # general variables options.Add( @@ -1330,7 +1337,7 @@ libraries = { "GafferUSD" : { "envAppends" : { - "LIBS" : [ "Gaffer", "GafferDispatch", "GafferScene", "IECoreScene$CORTEX_LIB_SUFFIX" ] + [ "${USD_LIB_PREFIX}" + x for x in [ "sdf", "arch", "tf", "vt" ] ], + "LIBS" : [ "Gaffer", "GafferDispatch", "GafferScene", "IECoreScene$CORTEX_LIB_SUFFIX" ] + [ "${USD_LIB_PREFIX}" + x for x in env["USD_LIB_SUFFIXES"].split( " " ) ], # USD includes "at least one deprecated or antiquated header", so we # have to drop our usual strict warning levels. "CXXFLAGS" : [ "-Wno-deprecated" if env["PLATFORM"] != "win32" else "/wd4996" ], diff --git a/config/ie/options b/config/ie/options index 3083e106871..4941203020c 100644 --- a/config/ie/options +++ b/config/ie/options @@ -461,6 +461,9 @@ if usdIncludePath: if usdLibPath: LOCATE_DEPENDENCY_LIBPATH.insert(0, usdLibPath) +# ImageEngine is now using a monolithic build of USD +USD_LIB_SUFFIXES = "usd_ms" + ########################################################################## # get compiler and other build tools set up ##########################################################################