-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAYA-105621 - MayaUSD: install USD from artifact beside plugin #631
Changes from 1 commit
b85cc41
fe99f65
f7862eb
10c096e
5bce740
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,7 +177,16 @@ endif() | |
#------------------------------------------------------------------------------ | ||
# install | ||
#------------------------------------------------------------------------------ | ||
configure_file(mayaUSD.mod.template ${PROJECT_BINARY_DIR}/mayaUSD.mod) | ||
if (DEFINED MAYAUSD_TO_USD_RELATIVE_PATH) | ||
set(USD_INSTALL_LOCATION "${CMAKE_INSTALL_PREFIX}/${MAYAUSD_TO_USD_RELATIVE_PATH}") | ||
else() | ||
set(USD_INSTALL_LOCATION ${PXR_USD_LOCATION}) | ||
endif() | ||
if (IS_WINDOWS) | ||
configure_file(mayaUSD_Win.mod.template ${PROJECT_BINARY_DIR}/mayaUSD.mod) | ||
else() | ||
configure_file(mayaUSD.mod.template ${PROJECT_BINARY_DIR}/mayaUSD.mod) | ||
endif() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created Windows specific .mod file (with PATH) and one for Linux/Mac (no PATH) |
||
install(FILES ${PROJECT_BINARY_DIR}/mayaUSD.mod | ||
DESTINATION ${CMAKE_INSTALL_PREFIX} | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,15 @@ | |
# | ||
function(init_usd) | ||
# Adjust PYTHONPATH, PATH | ||
mayaUsd_append_path_to_env_var("PYTHONPATH" "${PXR_USD_LOCATION}/lib/python") | ||
if (DEFINED MAYAUSD_TO_USD_RELATIVE_PATH) | ||
set(USD_INSTALL_LOCATION "${CMAKE_INSTALL_PREFIX}/${MAYAUSD_TO_USD_RELATIVE_PATH}") | ||
else() | ||
set(USD_INSTALL_LOCATION ${PXR_USD_LOCATION}) | ||
endif() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again when given a USD relative path, use that for the PATH and PYTHONPATH. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I realized (from a clean build) that this change breaks the build. We need the PATH and PYTHONPATH to usd during the configure step for generating the schemas. So for that step we need to use USD from it's original location. But then for running the tests we would want PATH & PYTHONPATH to point to the USD in the install folder. I need to think some more how to fix this. |
||
|
||
mayaUsd_append_path_to_env_var("PYTHONPATH" "${USD_INSTALL_LOCATION}/lib/python") | ||
if(WIN32) | ||
mayaUsd_append_path_to_env_var("PATH" "${PXR_USD_LOCATION}/bin;${PXR_USD_LOCATION}/lib") | ||
mayaUsd_append_path_to_env_var("PATH" "${USD_INSTALL_LOCATION}/bin;${USD_INSTALL_LOCATION}/lib") | ||
endif() | ||
endfunction() | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,37 @@ | ||
+ USD ${USD_VERSION} ${PXR_USD_LOCATION} | ||
+ USD ${USD_VERSION} ${USD_INSTALL_LOCATION} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed to new variable which is set from top-level CMakeLists.txt above. |
||
icons: | ||
plug-ins: | ||
presets: | ||
scripts: | ||
resources: | ||
Comment on lines
+2
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use Maya module specific tags to not add anything specific for these paths since USD is not a Maya plugin and doesn't need Maya to know about its icons/presets/etc. |
||
PYTHONPATH+:=lib/python | ||
PATH+:=bin | ||
PATH+:=lib | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These PATH vars are no needed on Linux/Mac. There is a Windows specific .mod template now. |
||
|
||
+ PXR_USDMAYA ${USD_VERSION} ${CMAKE_INSTALL_PREFIX}/plugin/pxr | ||
icons: maya/lib/usd/usdMaya/resources | ||
plug-ins: maya/plugin | ||
scripts: maya/lib/usd/usdMaya/resources | ||
Comment on lines
+12
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use module tags rather than setting the vars directly. |
||
PYTHONPATH+:=lib/python | ||
PATH+:=maya/lib | ||
XBMLANGPATH+:=maya/lib/usd/usdMaya/resources | ||
MAYA_SCRIPT_PATH+:=maya/lib/usd/usdMaya/resources | ||
MAYA_PLUG_IN_PATH+:=maya/plugin | ||
PXR_PLUGINPATH_NAME+:=lib/usd | ||
|
||
+ MayaUSD_LIB ${MAYAUSD_VERSION} ${CMAKE_INSTALL_PREFIX} | ||
PATH+:=lib | ||
icons: | ||
plug-ins: | ||
presets: | ||
scripts: | ||
resources: | ||
PYTHONPATH+:=lib/python | ||
PXR_PLUGINPATH_NAME+:=lib/usd | ||
VP2_RENDER_DELEGATE_PROXY=1 | ||
${MAYAUSD_GTEST_PATH} | ||
|
||
+ MayaUSD ${MAYAUSD_VERSION} ${CMAKE_INSTALL_PREFIX}/plugin/adsk | ||
MAYA_PLUG_IN_PATH+:=plugin | ||
plug-ins: plugin | ||
|
||
+ AL_USDMaya ${AL_USDMAYA_VERSION} ${CMAKE_INSTALL_PREFIX}/plugin/al | ||
plug-ins: plugin | ||
PYTHONPATH+:=lib/python | ||
PATH+:=lib | ||
MAYA_PLUG_IN_PATH+:=plugin | ||
PXR_PLUGINPATH_NAME+:=lib/usd | ||
PXR_PLUGINPATH_NAME+:=plugin | ||
|
||
+ MTOH ${MAYAUSD_VERSION} ${CMAKE_INSTALL_PREFIX}/lib | ||
MAYA_PLUG_IN_PATH+:=maya | ||
plug-ins: maya |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
+ USD ${USD_VERSION} ${USD_INSTALL_LOCATION} | ||
icons: | ||
plug-ins: | ||
presets: | ||
scripts: | ||
resources: | ||
PYTHONPATH+:=lib/python | ||
PATH+:=bin | ||
PATH+:=lib | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Windows specific mod template which just has these extra PATH lines. Otherwise it's identical. |
||
|
||
+ PXR_USDMAYA ${USD_VERSION} ${CMAKE_INSTALL_PREFIX}/plugin/pxr | ||
icons: maya/lib/usd/usdMaya/resources | ||
plug-ins: maya/plugin | ||
scripts: maya/lib/usd/usdMaya/resources | ||
PYTHONPATH+:=lib/python | ||
PATH+:=maya/lib | ||
PXR_PLUGINPATH_NAME+:=lib/usd | ||
|
||
+ MayaUSD_LIB ${MAYAUSD_VERSION} ${CMAKE_INSTALL_PREFIX} | ||
icons: | ||
plug-ins: | ||
presets: | ||
scripts: | ||
resources: | ||
PATH+:=lib | ||
PYTHONPATH+:=lib/python | ||
PXR_PLUGINPATH_NAME+:=lib/usd | ||
VP2_RENDER_DELEGATE_PROXY=1 | ||
${MAYAUSD_GTEST_PATH} | ||
|
||
+ MayaUSD ${MAYAUSD_VERSION} ${CMAKE_INSTALL_PREFIX}/plugin/adsk | ||
plug-ins: plugin | ||
|
||
+ AL_USDMaya ${AL_USDMAYA_VERSION} ${CMAKE_INSTALL_PREFIX}/plugin/al | ||
plug-ins: plugin | ||
PYTHONPATH+:=lib/python | ||
PATH+:=lib | ||
PXR_PLUGINPATH_NAME+:=lib/usd | ||
PXR_PLUGINPATH_NAME+:=plugin | ||
|
||
+ MTOH ${MAYAUSD_VERSION} ${CMAKE_INSTALL_PREFIX}/lib | ||
plug-ins: maya |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When given a USD relative path (from the ADSK internal build system) we will use that for the USD path in the .mod file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: "USD_INSTALL_LOCATION" is a variable inside the module template files.