-
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
Split Maya module file into separate plugins #731
Conversation
seando-adsk
commented
Aug 21, 2020
- Split mod file into three (one for each plugin).
- When running tests we only need PATH for Windows and not LD_LIBRARY_PATH.
* When running tests we only need PATH for Windows and not LD_LIBRARY_PATH.
if (BUILD_ADSK_PLUGIN) | ||
if (IS_WINDOWS) | ||
configure_file("modules/mayaUSD_Win.mod.template" ${PROJECT_BINARY_DIR}/mayaUSD.mod) | ||
else() | ||
configure_file("modules/mayaUSD.mod.template" ${PROJECT_BINARY_DIR}/mayaUSD.mod) | ||
endif() | ||
install(FILES ${PROJECT_BINARY_DIR}/mayaUSD.mod DESTINATION ${CMAKE_INSTALL_PREFIX}) | ||
endif() |
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.
Each plugin now has its own module file. So configure each one separately.
if(IS_WINDOWS) | ||
# Put path at the front of the list of env vars. | ||
list(INSERT ALL_PATH_VARS 0 | ||
PATH | ||
) | ||
else() | ||
list(APPEND ALL_PATH_VARS | ||
LD_LIBRARY_PATH | ||
) | ||
endif() |
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.
env var PATH is only needed and Windows. And on Windows we don't need LD_LIBRARY_PATH.
+ AL_USDMaya ${AL_USDMAYA_VERSION} ${CMAKE_INSTALL_PREFIX}/plugin/al | ||
plug-ins: plugin | ||
PYTHONPATH+:=lib/python | ||
PXR_PLUGINPATH_NAME+:=lib/usd | ||
PXR_PLUGINPATH_NAME+:=plugin |
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.
Moved here as-is from the mayaUsd.mod.template.
scripts: maya/lib/usd/usdMaya/resources | ||
PYTHONPATH+:=lib/python | ||
PXR_PLUGINPATH_NAME+:=lib/usd | ||
USD_LOCATION:= |
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.
Helper env variable which will be set to the location where USD is (when running Maya). Inside Maya can then query and use that var.
+ MTOH ${MAYAUSD_VERSION} ${CMAKE_INSTALL_PREFIX}/lib | ||
icons: | ||
plug-ins: maya | ||
presets: | ||
scripts: | ||
resources: |
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.
mtoh doesn't need all these extra vars. This is the syntax to remove them.
if(BUILD_PXR_PLUGIN) | ||
# This test uses the file "PxrUsdPreviewSurfaceExportTest.ma" which | ||
# requires the plugin "pxrUsdPreviewSurface" that is built by the | ||
# Pixar plugin. | ||
list(APPEND TEST_SCRIPT_FILES | ||
testPxrUsdPreviewSurfaceExport.py | ||
) | ||
endif() |
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.
I discovered this while building only the MayaUsd plugin (I turned off Pixar and AL). When running the tests this one failed because it need the pxrUsdPreviewSurface plugin built only when building Pixar plugin.
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.
lgtm! Thanks Sean.