Boost logo

Boost-Build :

Subject: [Boost-build] Help building Maya plugins
From: Justin Walker (Justin.Walker_at_[hidden])
Date: 2008-12-19 20:00:56

I'm trying to set up a build system that will allow us to easily build
and install Maya plugins. I'll start by explaining what I want and
enumerate each of the steps I'd like help with.

Maya is a 3D software package that provides an API and libraries for
writing plugins. You typically write your C++ code, include the
appropriate Maya headers, link against the appropriate Maya libraries,
then point Maya to the location of your compiled plugins in order to
load them. Our challenge is that we have many different versions of Maya
available. Sometimes we want to compile against a single version and
sometimes against multiple versions. Here is a typical scenario:

Maya is installed in /apps/maya/<version>. So we could have the following:

I want to write a rule that would look something like the following:

lib plugin : plugin.cpp /maya//Maya ;

and it will generate the following:

g++ -o bin/blah/1.0.0/ -I/apps/maya/1.0.0/include
-L/apps/maya/1.0.0/lib -lMaya
g++ -o bin/blah/1.0.1/ -I/apps/maya/1.0.1/include
-L/apps/maya/1.0.1/lib -lMaya
g++ -o bin/blah/1.1.0/ -I/apps/maya/1.1.0/include
-L/apps/maya/1.1.0/lib -lMaya

Note that the output binary name is "" and not "".

I want the installed libraries to get installed into the following


I then want to be able to override this when necessary. Something like
the following:

lib plugin : plugin.cpp /maya//Maya : <maya>1.0.0 ;

This only builds the 1.0.0 version of the plugin.

Finally sometimes the 1.0.1 version is binary compatible with the 1.0.0
version. Instead of building a plugin I instead want to create a symlink
named maya/plugins/1.0.1 that points to maya/plugins/1.0.0.

I'd appreciate any help on how to approach this challenge. Should I
create a new Maya package? Should I create a new feature and add each of
the version strings as possible values? How do I iterate over each of
the requested values and modify the include and search properties
appropriately. How do I assign the install dir based on the version string?

Thanks in advance for any help you can give.

Justin Walker

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at