Build: install USD Storm and MaterialX libraries by default
* Bundle hdStorm and associated plugins * Enable WITH_MATERIALX by default to bundle MaterialX libraries * Set PXR_MTLX_STDLIB_SEARCH_PATHS so Storm can find MaterialX files Co-authored-by: Georgiy Markelov <georgiy.m.markelov@gmail.com> Co-authored-by: Brecht Van Lommel <brecht@blender.org> Ref #110765, #104712
This commit is contained in:
parent
efe10cee5c
commit
61f407d427
|
@ -365,7 +365,7 @@ option(WITH_ALEMBIC "Enable Alembic Support" ON)
|
||||||
option(WITH_USD "Enable Universal Scene Description (USD) Support" ON)
|
option(WITH_USD "Enable Universal Scene Description (USD) Support" ON)
|
||||||
|
|
||||||
# MaterialX
|
# MaterialX
|
||||||
option(WITH_MATERIALX "Enable MaterialX Support" OFF)
|
option(WITH_MATERIALX "Enable MaterialX Support" ON)
|
||||||
|
|
||||||
# 3D format support
|
# 3D format support
|
||||||
# Disable opencollada when we don't have precompiled libs
|
# Disable opencollada when we don't have precompiled libs
|
||||||
|
|
|
@ -57,7 +57,7 @@ set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_TBB ON CACHE BOOL "" FORCE)
|
set(WITH_TBB ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_USD ON CACHE BOOL "" FORCE)
|
set(WITH_USD ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_MATERIALX OFF CACHE BOOL "" FORCE)
|
set(WITH_MATERIALX ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ set(WITH_QUADRIFLOW ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_TBB ON CACHE BOOL "" FORCE)
|
set(WITH_TBB ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_USD ON CACHE BOOL "" FORCE)
|
set(WITH_USD ON CACHE BOOL "" FORCE)
|
||||||
set(WITH_MATERIALX OFF CACHE BOOL "" FORCE)
|
set(WITH_MATERIALX ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
|
|
@ -965,6 +965,10 @@ if(WITH_USD)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WITH_MATERIALX)
|
||||||
|
include("${LIBDIR}/MaterialX/lib/cmake/MaterialX/MaterialXTargets.cmake")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WINDOWS_PYTHON_DEBUG)
|
if(WINDOWS_PYTHON_DEBUG)
|
||||||
# Include the system scripts in the blender_python_system_scripts project.
|
# Include the system scripts in the blender_python_system_scripts project.
|
||||||
file(GLOB_RECURSE inFiles "${CMAKE_SOURCE_DIR}/scripts/*.*" )
|
file(GLOB_RECURSE inFiles "${CMAKE_SOURCE_DIR}/scripts/*.*" )
|
||||||
|
|
|
@ -38,7 +38,11 @@ materialx_libs_dir = os.path.abspath(os.path.join(shared_lib_dir, "materialx", "
|
||||||
materialx_libs_env = os.getenv("MATERIALX_SEARCH_PATH")
|
materialx_libs_env = os.getenv("MATERIALX_SEARCH_PATH")
|
||||||
if materialx_libs_env is None:
|
if materialx_libs_env is None:
|
||||||
os.environ["MATERIALX_SEARCH_PATH"] = materialx_libs_dir
|
os.environ["MATERIALX_SEARCH_PATH"] = materialx_libs_dir
|
||||||
elif sys.platform == "win32":
|
|
||||||
os.environ["MATERIALX_SEARCH_PATH"] = materialx_libs_dir + ";" + materialx_libs_env
|
|
||||||
else:
|
else:
|
||||||
os.environ["MATERIALX_SEARCH_PATH"] = materialx_libs_dir + ":" + materialx_libs_env
|
os.environ["MATERIALX_SEARCH_PATH"] = materialx_libs_env + os.pathsep + materialx_libs_dir
|
||||||
|
|
||||||
|
materialx_libs_env = os.getenv("PXR_MTLX_STDLIB_SEARCH_PATHS")
|
||||||
|
if materialx_libs_env is None:
|
||||||
|
os.environ["PXR_MTLX_STDLIB_SEARCH_PATHS"] = materialx_libs_dir
|
||||||
|
else:
|
||||||
|
os.environ["PXR_MTLX_STDLIB_SEARCH_PATHS"] = materialx_libs_env + os.pathsep + materialx_libs_dir
|
||||||
|
|
|
@ -1623,16 +1623,32 @@ if((DEFINED LIBDIR) AND TARGETDIR_LIB)
|
||||||
${USD_LIBRARY_DIR}/usd
|
${USD_LIBRARY_DIR}/usd
|
||||||
DESTINATION ${TARGETDIR_LIB}
|
DESTINATION ${TARGETDIR_LIB}
|
||||||
)
|
)
|
||||||
|
install(DIRECTORY
|
||||||
|
${LIBDIR}/usd/plugin/usd/hdStorm
|
||||||
|
${LIBDIR}/usd/plugin/usd/usdShaders
|
||||||
|
${LIBDIR}/usd/plugin/usd/hioOiio
|
||||||
|
DESTINATION "./blender.shared/usd"
|
||||||
|
)
|
||||||
elseif(USD_PYTHON_SUPPORT)
|
elseif(USD_PYTHON_SUPPORT)
|
||||||
install(DIRECTORY
|
install(DIRECTORY
|
||||||
${USD_LIBRARY_DIR}/usd
|
${USD_LIBRARY_DIR}/usd
|
||||||
DESTINATION ${TARGETDIR_LIB}
|
DESTINATION ${TARGETDIR_LIB}
|
||||||
)
|
)
|
||||||
|
install(DIRECTORY
|
||||||
|
${LIBDIR}/usd/plugin/usd/hdStorm
|
||||||
|
${LIBDIR}/usd/plugin/usd/usdShaders
|
||||||
|
DESTINATION ${TARGETDIR_LIB}/usd
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
install(DIRECTORY
|
install(DIRECTORY
|
||||||
${USD_LIBRARY_DIR}/usd
|
${USD_LIBRARY_DIR}/usd
|
||||||
DESTINATION "${TARGETDIR_VER}/datafiles"
|
DESTINATION "${TARGETDIR_VER}/datafiles"
|
||||||
)
|
)
|
||||||
|
install(DIRECTORY
|
||||||
|
${LIBDIR}/usd/plugin/usd/hdStorm
|
||||||
|
${LIBDIR}/usd/plugin/usd/usdShaders
|
||||||
|
DESTINATION "${TARGETDIR_VER}/datafiles/usd"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
Loading…
Reference in New Issue