[Scons-users] Windows resource files and variant builds

Tom Tanner trtanner at btinternet.com
Tue Mar 17 09:43:44 EDT 2015


I've just been putting an scons build into a windows QT project and I ran into an interesting thing on a windows
resource file when using variant dirs

The resource file contains this:

#ifdef _DEBUG
IDR_LOADER_DLL         BINARY   MOVEABLE  PURE    "..\\..\\otherModule\\debug\\otherModule.dll"

#else  //  _DEBUG

IDR_LOADER_DLL         BINARY   MOVEABLE  PURE    "..\\..\\otherModule\\release\\otherModule.dll"

#endif  //  _DEBUG

and I'm rather at a lose at what to put in there. Clearly I can get rid of the 'debug' and 'release' bits, but
it seems like I want to put the <variantdir>\\ in there somehow. And I'm somewhere in an SConscript file which
doesn't know what they are.

The other thing I'm having a problem with is that presumably the generated file will depend on the dll. Now, there's
a build for the dll, but if I put

env.Depends('my.res','..\\..\\otherModule\\otherModule.dll')

I get:

Explicit dependency `source\otherModule\\otherModule.dll' not found

But that module is built by another SConscript in the same build. But obviously it's not in 'source'
  



More information about the Scons-users mailing list