premiere-libtorrent/bindings/python/Jamfile

88 lines
2.1 KiB
Plaintext
Executable File

import python ;
use-project /torrent : ../.. ;
lib boost_python : : <target-os>darwin <name>boost_python-mt $(boost-library-search-path) ;
lib boost_python : : <name>boost_python ;
rule libtorrent_linking ( properties * )
{
local result ;
if <toolset>gcc in $(properties)
{
result += <fpic>on ;
}
if <toolset>gcc in $(properties)
|| <toolset>darwin in $(properties)
|| <toolset>clang in $(properties)
{
result += <cxxflags>-fvisibility=hidden ;
}
# when building peer_plugin.cpp on msvc-7.1 it fails
# running out of internal heap space. Don't add it
# to windows build, since it's not critical anyway
if <toolset>msvc in $(properties)
{
result += <define>TORRENT_NO_PYTHON_PLUGINS ;
}
else
{
result += <source>src/peer_plugin.cpp ;
}
if <boost>source in $(properties)
{
if <boost-link>static in $(properties) || <link>static in $(properties)
{
result += <library>/boost/python//boost_python/<link>static ;
result += <library>/torrent//torrent/<link>static ;
}
else
{
result += <library>/boost/python//boost_python/<link>shared ;
result += <library>/torrent//torrent/<link>shared/<boost-link>shared ;
}
}
else
{
result += <library>boost_python ;
result += <library>/torrent//torrent/<link>shared/<boost-link>shared ;
}
return $(result) ;
}
python-extension libtorrent
: src/module.cpp
src/big_number.cpp
src/converters.cpp
src/create_torrent.cpp
src/fingerprint.cpp
src/utility.cpp
src/session.cpp
src/entry.cpp
src/torrent_info.cpp
src/torrent_handle.cpp
src/torrent_status.cpp
src/session_settings.cpp
src/version.cpp
src/alert.cpp
src/datetime.cpp
src/extensions.cpp
src/torrent.cpp
src/peer_info.cpp
src/ip_filter.cpp
src/magnet_uri.cpp
src/error_code.cpp
: <include>src
<conditional>@libtorrent_linking
:
<boost-link>static
;
install stage_module : libtorrent : <location>. ;