Boost logo

Boost-Build :

Subject: [Boost-build] Adobe AfterEffect plug-in compilation
From: Motonari Ito (motonarii_at_[hidden])
Date: 2009-01-20 01:08:25


I want to compile Adobe After Effect Plug-in with bjam. The build
process for resource file (.rc) is quite tricky and I cannot make it
work so far.

The resource build process starts with foo.r, which is Adobe proprietary
file format. First of all, run C/C++ preprocessor to expand macro and
make foo.rr.

% cl /EP foo.r > foo.rr

Then, run the special tool (provided by Adobe) to convert the .rr file
to .rrc file.

% PiPLTool foo.rr foo.rrc

Then, run C/C++ preprocessor again to expand macro.

% cl /EP foo.rrc > foo.rc

Then, there is a main.rc file which includes foo.rc. The main.rc is
compiled and linked to the plug-in DLL.

Here is my try. When main.rc includes foo.rc, it fails with an error

main.rc(3) : fatal error RC1015: cannot open include file 'foo.rc'.

Obviously, obj rule does not set proper include path to foo.rc. How can
I instruct obj rule to set include path to the output location of rrc2rc

make foo.rr : foo.r : @r2rr ;
actions r2rr
  $(COMPILER) /I Headers /EP $(>) > $(<)

make foo.rrc : foo.rr : @rr2rrc ;
actions rr2rrc
  $(ADOBE_TOOL) $(>) $(<)

make foo.rc : foo.rrc : @rrc2rc ;
actions rrc2rc
  $(COMPILER) /I Headers /EP $(>) > $(<)

obj res : main.rc
        : <implicit-dependency>foo.rc

lib plugin : res source.cpp : <link>shared ;

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