3

I need to describe an external library in a Jamfile. The location of the library is held in an environment variable.

set EX_LIB_PATH=C:\Program Files\Ext

Here is the snippet from the Jamfile:

--snip--

lib extlin : : <file>$(EXT_LIB_PATH)/lib/library.lib ;

--spin--

bjam croaks saying that "C:\Program" cannot be found. What can be done to get the lib rule call in the Jamfile to accept a path with an embedded space?

2 Answers2

2

A bit late, but for reference, try this:

lib extlin : : <file>"$(EXT_LIB_PATH:J=\ )/lib/library.lib" ;

Worked for me on Boost.Jam Version 3.1.10. OS=NT.

olivier2
  • 21
  • 2
0

Did you try putting it in quotes?

lib extlin : : <file>"$(EXT_LIB_PATH)/lib/library.lib" ;

It's a question of when, exactly, bjam expands the variable name, and if something else further down the line has a problem with a filename with spaces. But I believe this should work.

AFoglia
  • 7,968
  • 3
  • 35
  • 51