From 64cb8696cd6ff5e45c9f7dd6632970e1c6c69885 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 8 May 2008 01:53:05 +0000 Subject: [PATCH] Jamfile fixes for the python bindings to work with system installed boost libraries --- Jamfile | 8 +++++--- bindings/python/Jamfile | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Jamfile b/Jamfile index 0cfd75043..066dcfdb1 100755 --- a/Jamfile +++ b/Jamfile @@ -89,7 +89,8 @@ rule linking ( properties * ) if system in $(properties) { result += boost_filesystem - boost_thread boost_iostreams + boost_thread + boost_iostreams ; } @@ -230,8 +231,9 @@ lib gdi32 : : gdi32 ; local library-search-path = /opt/local/lib /usr/lib /usr/local/lib /sw/lib ; -lib filesystem : : boost_filesystem $(library-search-path) ; -lib thread : : boost_thread $(library-search-path) ; +lib boost_filesystem : : boost_filesystem $(library-search-path) ; +lib boost_thread : : boost_thread $(library-search-path) ; +lib boost_iostreams : : boost_iostreams $(library-search-path) ; # openssl on linux/bsd/macos etc. lib crypto : : crypto ; diff --git a/bindings/python/Jamfile b/bindings/python/Jamfile index e93a45240..21a598c82 100755 --- a/bindings/python/Jamfile +++ b/bindings/python/Jamfile @@ -2,6 +2,25 @@ import python ; use-project /torrent : ../.. ; +# rule for linking the correct libraries depending +# on features and target-os +rule linking ( properties * ) +{ + local result ; + if system in $(properties) + { + result += boost_python ; + } + + if source in $(properties) + { + result += /boost/python//boost_python ; + } + return $(result) ; +} + +lib boost_python : : boost_python $(library-search-path) ; + python-extension libtorrent : src/module.cpp src/big_number.cpp @@ -24,7 +43,7 @@ python-extension libtorrent src/peer_info.cpp src/ip_filter.cpp /torrent//torrent - /boost/python//boost_python : src + : @linking ;