merged changes from RC_1_0

This commit is contained in:
Arvid Norberg 2014-11-28 18:58:18 +00:00
parent 8b4dcb2959
commit 5cb49da3cf
1 changed files with 26 additions and 2 deletions

View File

@ -1,5 +1,8 @@
import python ;
import feature : feature ;
import project ;
import targets ;
import "class" : new ;
use-project /torrent : ../.. ;
@ -10,7 +13,7 @@ feature visibility : default hidden : composite propagated link-incompatible ;
feature.compose <visibility>hidden : <cflags>-fvisibility=hidden <cxxflags>-fvisibility-inlines-hidden ;
feature libtorrent-link : static shared : ;
feature libtorrent-python-pic : on off : composite propagated link-incompatible ;
feature libtorrent-python-pic : off on : composite propagated link-incompatible ;
feature.compose <libtorrent-python-pic>on : <cflags>-fPIC ;
rule libtorrent_linking ( properties * )
@ -75,7 +78,27 @@ rule libtorrent_linking ( properties * )
return $(result) ;
}
python-extension libtorrent
# this is a copy of the rule from boost-build's python-extension, but without
# specifying <suppress-import-lib>no as a mandatory property. That property
# would otherwise cause build failures because it suppresses linking against the
# runtime library and kernel32 on windows
rule my-python-extension ( name : sources * : requirements * : default-build * :
usage-requirements * )
{
requirements += <use>/python//python_for_extensions ;
local project = [ project.current ] ;
targets.main-target-alternative
[ new typed-target $(name) : $(project) : PYTHON_EXTENSION
: [ targets.main-target-sources $(sources) : $(name) ]
: [ targets.main-target-requirements $(requirements) : $(project) ]
: [ targets.main-target-default-build $(default-build) : $(project) ]
] ;
}
my-python-extension libtorrent
: # sources
src/module.cpp
src/big_number.cpp
@ -103,6 +126,7 @@ python-extension libtorrent
: # default build
<boost-link>static
<libtorrent-link>static
<suppress-import-lib>false
;
install stage_module : libtorrent : <location>. ;