Skip to content
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

Use CMake variables to fully configure mayaUSD.mod #29

Merged
merged 3 commits into from
Oct 1, 2019

Conversation

mattyjams
Copy link
Contributor

Hi all,

I'm not sure if you had other plans for this file, but wanted to see what you thought of this.

The two main changes here are extracting the AL_USDMaya version from its Version.h (and including that header in the build), and then using that along with the other existing CMake variables in mayaUSD.mod.template for the fields that needs to be replaced.

With these changes, my builds end up producing a mayaUSD.mod file that looks like this:

+ USD 0.19.10 /pixar/ws/trees/mattjohnson/usd_open_source/build/inst
PYTHONPATH+:=lib/python
PATH+:=bin
PATH+:=lib

+ PXR_USDMAYA 0.19.10 /home/mattjohnson/local/open_source_projects/maya-usd/build/install/RelWithDebInfo/plugin/pxr
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

+ AL_USDMaya 0.32.15 /home/mattjohnson/local/open_source_projects/maya-usd/build/install/RelWithDebInfo/plugin/al
PYTHONPATH+:=lib/python
PATH+:=lib
MAYA_PLUG_IN_PATH+:=plugin
PXR_PLUGINPATH_NAME+:=lib/usd

And I can then launch Maya with the path to the file in my MAYA_MODULE_PATH and load the plugins without having to edit it further.

Let me know what you think! Thanks!

….template

This allows CMake's configure_file() function to create a directly usable
mayaUSD.mod file with version numbers and paths set by the build.
@HamedSabri-adsk
Copy link
Contributor

Hi Matt, this looks great!!

I really don't have a preference for at-style syntax vs curly braces.

@rhaleblian
Copy link

If a .mod file cannot utilize curly braces intrinsically, we should just use curly braces.

kxl-adsk pushed a commit that referenced this pull request Aug 23, 2019
@HamedSabri-adsk HamedSabri-adsk merged commit 60a360c into Autodesk:dev Oct 1, 2019
@mattyjams mattyjams deleted the configure_maya_mod_file branch October 1, 2019 23:53
murphyeoin pushed a commit to AnimalLogic/maya-usd that referenced this pull request Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants