|
Boost-Build : |
From: Pedro Ferreira (pedro.ferreira_at_[hidden])
Date: 2003-09-19 04:08:14
Hi all,
I have been considering how to solve the problem below for a while and would appreciate any suggestions.
The target system is Windows. For Linux things would be slightly different.
Suppose:
- I want to build library A that depends on library B;
- If A is to be linked as a dll, I want to link with library B, so I use <library>B;
- If A is to be linked statically, I just want to inherit B's usage requirements.
What's the best way to achieve this? What I've been doing is putting on A'sJamfile something like:
path-to-b = ...
...
<link>shared:<library>B
<link>static:<include>path-to-b
Works but is not very convenient because, if B happens to have usage requirements other that just the include path, things get really messy.
A post dated 16 August from Volodya to Peter Schoen proposes adapting $boost_root/test/unused/project-root.jam in order to generate a 'header-only-library'. I could do this for library B if A is to be linked statically. Could this be a starting point?
Any ideas?
Thanks in advance,
Pedro
------=_NextPart_000_00AA_01C37E95.F04BC430 Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2730.1700" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV>Hi all,</DIV>
<DIV> </DIV>
<DIV>I have been considering how to solve the problem below for a while and
would appreciate any suggestions.</DIV>
<DIV> </DIV>
<DIV>The target system is Windows. For Linux things would be slightly
different.</DIV>
<DIV> </DIV>
<DIV>Suppose:</DIV>
<DIV> </DIV>
<DIV>- I want to build library A that depends on library B;</DIV>
<DIV>- If A is to be linked as a dll, I want to link with libraryB,
so I use <library>B;</DIV>
<DIV>- If A is to be linked statically, I just want to inherit B's usage
requirements.</DIV>
<DIV> </DIV>
<DIV>What's the best way to achieve this? What I've been doing is putting on A's
Jamfile something like:</DIV>
<DIV> </DIV>
<DIV>path-to-b = ...</DIV>
<DIV>...</DIV>
<DIV><link>shared:<library>B</DIV>
<DIV><link>static:<include>path-to-b</DIV>
<DIV> </DIV>
<DIV>Works but is not very convenient because, if B happens to have usage
requirements other that just the include path, things get really messy.</DIV>
<DIV> </DIV>
<DIV>A post dated 16 August from Volodya to Peter Schoen proposes adapting
$boost_root/test/unused/project-root.jam in order to generate a
'header-only-library'. I could do this for library B if A is to be linked
statically. Could this be a starting point?</DIV>
<DIV> </DIV>
<DIV>Any ideas?</DIV>
<DIV> </DIV>
<DIV>Thanks in advance,</DIV>
<DIV> </DIV>
<DIV>Pedro</DIV></FONT></DIV></BODY></HTML>
------=_NextPart_000_00AA_01C37E95.F04BC430--
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk