added option to link against installed boost libraries instead of building from source (boost=system and boost=source, system is default). Removed dependency in boost serialization headers
This commit is contained in:
parent
a46ef3ece8
commit
9f24c6d79c
33
Jamfile
33
Jamfile
|
@ -11,14 +11,11 @@ BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
|
||||||
ECHO "BOOST_ROOT =" $(BOOST_ROOT) ;
|
ECHO "BOOST_ROOT =" $(BOOST_ROOT) ;
|
||||||
ECHO "OS =" [ os.name ] ;
|
ECHO "OS =" [ os.name ] ;
|
||||||
|
|
||||||
if ! $(BOOST_ROOT)
|
if $(BOOST_ROOT)
|
||||||
{
|
{
|
||||||
errors.user-error
|
use-project /boost : $(BOOST_ROOT) ;
|
||||||
"BOOST_ROOT must be set to your boost installation path." ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
use-project /boost : $(BOOST_ROOT) ;
|
|
||||||
|
|
||||||
# rule for linking the correct libraries depending
|
# rule for linking the correct libraries depending
|
||||||
# on features and target-os
|
# on features and target-os
|
||||||
rule linking ( properties * )
|
rule linking ( properties * )
|
||||||
|
@ -64,6 +61,22 @@ rule linking ( properties * )
|
||||||
# result += <library>rt ;
|
# result += <library>rt ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if <boost>system in $(properties)
|
||||||
|
{
|
||||||
|
result += <library>filesystem
|
||||||
|
<library>thread
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
if <boost>source in $(properties)
|
||||||
|
{
|
||||||
|
result += <library>/boost/thread//boost_thread
|
||||||
|
<library>/boost/filesystem//boost_filesystem
|
||||||
|
<include>$(BOOST_ROOT)
|
||||||
|
<define>BOOST_ALL_NO_LIB
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
return $(result) ;
|
return $(result) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,6 +139,8 @@ feature.compose <statistics>on : <define>TORRENT_STATS ;
|
||||||
feature upnp-logging : off on : composite propagated link-incompatible ;
|
feature upnp-logging : off on : composite propagated link-incompatible ;
|
||||||
feature.compose <upnp-logging>on : <define>TORRENT_UPNP_LOGGING ;
|
feature.compose <upnp-logging>on : <define>TORRENT_UPNP_LOGGING ;
|
||||||
|
|
||||||
|
feature boost : system source : link-incompatible propagated ;
|
||||||
|
|
||||||
# required for openssl on windows
|
# required for openssl on windows
|
||||||
lib ssleay32 : : <name>ssleay32 ;
|
lib ssleay32 : : <name>ssleay32 ;
|
||||||
lib libeay32 : : <name>libeay32 ;
|
lib libeay32 : : <name>libeay32 ;
|
||||||
|
@ -134,6 +149,9 @@ lib user32 : : <name>User32 ;
|
||||||
lib shell32 : : <name>shell32 ;
|
lib shell32 : : <name>shell32 ;
|
||||||
lib gdi32 : : <name>gdi32 ;
|
lib gdi32 : : <name>gdi32 ;
|
||||||
|
|
||||||
|
lib filesystem : : <name>boost_filesystem ;
|
||||||
|
lib thread : : <name>boost_thread ;
|
||||||
|
|
||||||
# openssl on linux/bsd/macos etc.
|
# openssl on linux/bsd/macos etc.
|
||||||
lib crypto : : <name>crypto ;
|
lib crypto : : <name>crypto ;
|
||||||
|
|
||||||
|
@ -217,12 +235,9 @@ local usage-requirements =
|
||||||
<include>./include
|
<include>./include
|
||||||
<include>./include/libtorrent
|
<include>./include/libtorrent
|
||||||
<zlib>shipped:<include>./zlib
|
<zlib>shipped:<include>./zlib
|
||||||
<include>$(BOOST_ROOT)
|
|
||||||
<variant>release:<define>NDEBUG
|
<variant>release:<define>NDEBUG
|
||||||
<define>BOOST_ALL_NO_LIB
|
|
||||||
<define>_FILE_OFFSET_BITS=64
|
<define>_FILE_OFFSET_BITS=64
|
||||||
<library>/boost/thread//boost_thread #/<link>static
|
<define>BOOST_MULTI_INDEX_DISABLE_SERIALIZATION
|
||||||
<library>/boost/filesystem//boost_filesystem #/<link>static
|
|
||||||
<conditional>@linking
|
<conditional>@linking
|
||||||
<zlib>system:<library>zlib-target
|
<zlib>system:<library>zlib-target
|
||||||
# these compiler settings just makes the compiler standard conforming
|
# these compiler settings just makes the compiler standard conforming
|
||||||
|
|
|
@ -3,7 +3,14 @@ import modules ;
|
||||||
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
|
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
|
||||||
|
|
||||||
use-project /torrent : .. ;
|
use-project /torrent : .. ;
|
||||||
use-project /boost : $(BOOST_ROOT) ;
|
|
||||||
|
if $(BOOST_ROOT)
|
||||||
|
{
|
||||||
|
use-project /boost : $(BOOST_ROOT) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
lib program-options : : <name>boost_program_options ;
|
||||||
|
lib regex : : <name>boost_regex ;
|
||||||
|
|
||||||
project client_test
|
project client_test
|
||||||
: requirements
|
: requirements
|
||||||
|
@ -12,7 +19,13 @@ project client_test
|
||||||
<link>static
|
<link>static
|
||||||
;
|
;
|
||||||
|
|
||||||
exe client_test : client_test.cpp /boost/program_options /boost/regex ;
|
exe client_test : client_test.cpp
|
||||||
|
: <boost>source:<library>/boost/program_options
|
||||||
|
<boost>source:<library>/boost/regex
|
||||||
|
<boost>system:<library>program-options
|
||||||
|
<boost>system:<library>regex
|
||||||
|
;
|
||||||
|
|
||||||
exe simple_client : simple_client.cpp ;
|
exe simple_client : simple_client.cpp ;
|
||||||
exe dump_torrent : dump_torrent.cpp ;
|
exe dump_torrent : dump_torrent.cpp ;
|
||||||
exe make_torrent : make_torrent.cpp ;
|
exe make_torrent : make_torrent.cpp ;
|
||||||
|
|
Loading…
Reference in New Issue