]>
Commit | Line | Data |
---|---|---|
92f5a8d4 | 1 | # Copyright Rene Rivera 2014-2019 |
7c673cae FG |
2 | # Distributed under the Boost Software License, Version 1.0. |
3 | # (See accompanying file LICENSE_1_0.txt or copy at | |
4 | # http://www.boost.org/LICENSE_1_0.txt) | |
5 | ||
92f5a8d4 TL |
6 | #| |
7 | This B2 project provides support for using the Predef library externally as | |
8 | a standalone project or by embedding in your B2 project tree. To use | |
9 | externally you would need a `use-project` declaration and to use the | |
10 | project as a dependency where needed: | |
11 | ||
12 | ---- | |
13 | use-project /hash-predef : /path/to/hash-predef/root ; | |
14 | ||
15 | exe my_thing : main.cpp : <dependency>/hash-predef ; | |
16 | ---- | |
17 | ||
18 | To use in your project tree you would only need to place the Predef tree | |
19 | in a subdirectory and reference the project location as a dependency where | |
20 | needed. | |
21 | ||
22 | ---- | |
23 | exe my_thin : main.cpp : <dependency>libs/hash-predef ; | |
24 | ---- | |
25 | |# | |
26 | ||
27 | import project ; | |
28 | ||
7c673cae | 29 | path-constant BOOST_PREDEF_ROOT : . ; |
92f5a8d4 TL |
30 | path-constant BOOST_PREDEF_INCLUDE : include ; |
31 | constant PREDEF_DIST : boost ; | |
32 | ||
33 | project /boost/predef | |
34 | : usage-requirements | |
35 | <include>$(BOOST_PREDEF_INCLUDE) ; | |
36 | ||
37 | if [ project.is-jamroot-module $(__name__) ] | |
38 | { | |
39 | local attributes = [ project.attributes $(__name__) ] ; | |
40 | $(attributes).set "build-dir" : bin ; | |
41 | } | |
42 | ||
43 | alias libs ; |