def render_delegate(env, sources): if (env['USD_BUILD_MODE'] == 'monolithic'): usd_deps = [ env['USD_MONOLITHIC_LIBRARY'], 'tbb', ] if (system.IS_LINUX): usd_deps = usd_deps + ['dl'] return (sources, add_optional_libs(env, usd_deps)) else: usd_libs = [ 'arch', 'plug', 'tf', 'vt', 'gf', 'work', 'hf', 'hd', 'hdx', 'sdf', 'usdImaging', 'usdLux', 'pxOsd', ] usd_deps = ['tbb'] usd_libs, usd_sources = build_tools.link_usd_libraries(env, usd_libs) usd_deps = usd_deps + usd_libs source_files = sources + usd_sources if (system.IS_LINUX): usd_deps = usd_deps + ['dl'] return (source_files, add_optional_libs(env, usd_deps))
def translator(env, sources): if env['USD_BUILD_MODE'] == 'monolithic': usd_deps = [ 'usd_translator', env['USD_MONOLITHIC_LIBRARY'], get_tbb_lib(env), ] return (sources, add_optional_libs(env, usd_deps)) elif env['USD_BUILD_MODE'] == 'static': # static builds rely on a monolithic static library if system.IS_WINDOWS: usd_deps = [ '-WHOLEARCHIVE:libusd_m', get_tbb_lib(env), 'Ws2_32', 'Dbghelp', 'Shlwapi', 'advapi32' ] else: usd_deps = [ 'libusd_m', get_tbb_lib(env), ] if system.IS_LINUX: usd_deps = usd_deps + ['dl', 'pthread'] return (sources, add_optional_libs(env, ['usd_translator'] + usd_deps)) else: # shared libs usd_libs = [ 'sdf', 'tf', 'usd', 'ar', 'usdGeom', 'usdShade', 'usdUtils', 'vt', 'usdLux', 'gf', 'usdVol', 'usdSkel', 'usdRender', 'work', ] usd_deps = [get_tbb_lib(env)] usd_libs, usd_sources = build_tools.link_usd_libraries(env, usd_libs) source_files = sources + usd_sources return (source_files, add_optional_libs(env, ['usd_translator'] + usd_deps + usd_libs))
def add_plugin_deps(env, sources, libs, needs_dl): if env['USD_BUILD_MODE'] == 'monolithic': usd_deps = [ env['USD_MONOLITHIC_LIBRARY'], get_tbb_lib(env), ] if needs_dl and system.IS_LINUX: usd_deps = libs + ['dl'] return (sources, add_optional_libs(env, usd_deps)) else: usd_deps = [get_tbb_lib(env)] usd_libs, usd_sources = build_tools.link_usd_libraries(env, libs) usd_deps = usd_deps + usd_libs source_files = sources + usd_sources if needs_dl and system.IS_LINUX: usd_deps = usd_deps + ['dl'] return (source_files, add_optional_libs(env, usd_deps))
def ndr_plugin(env, sources): if env['USD_BUILD_MODE'] == 'monolithic': usd_deps = [ env['USD_MONOLITHIC_LIBRARY'], 'tbb', ] return (sources, add_optional_libs(env, usd_deps)) else: usd_libs = [ 'arch', 'tf', 'gf', 'vt', 'ndr', 'sdr', 'sdf', 'usd', ] usd_deps = ['tbb'] usd_libs, usd_sources = build_tools.link_usd_libraries(env, usd_libs) usd_deps = usd_deps + usd_libs source_files = sources + usd_sources return (source_files, add_optional_libs(env, usd_deps))