Files
libtorrent/Jamfile

1129 lines
30 KiB
Plaintext
Raw Normal View History

# This Jamfile requires boost-build v2 to build.
# The version shipped with boost 1.34.0
2004-02-18 00:08:20 +00:00
2004-02-04 20:20:53 +00:00
import modules ;
2011-07-23 19:46:27 +00:00
import path ;
2004-02-21 11:52:21 +00:00
import os ;
2005-01-11 02:13:07 +00:00
import errors ;
import feature : feature ;
import package ;
import virtual-target ;
2019-05-11 18:28:48 -06:00
import cast ;
2004-02-04 20:20:53 +00:00
2021-03-04 08:00:19 +01:00
# we need version numbers in the form X.Y.Z in order to trigger the built-in
# support for generating symlinks to the installed library
2022-10-16 15:15:36 +02:00
VERSION = 2.0.8 ;
2004-02-04 20:20:53 +00:00
BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;
CXXFLAGS = [ modules.peek : CXXFLAGS ] ;
LDFLAGS = [ modules.peek : LDFLAGS ] ;
2004-02-04 20:20:53 +00:00
ECHO "CXXFLAGS =" $(CXXFLAGS) ;
ECHO "LDFLAGS =" $(LDFLAGS) ;
2004-07-25 21:44:53 +00:00
ECHO "OS =" [ os.name ] ;
jam-version = [ modules.peek : JAM_VERSION ] ;
if $(BOOST_ROOT)
2005-01-11 02:13:07 +00:00
{
ECHO "building boost from source directory: " $(BOOST_ROOT) ;
use-project /boost : $(BOOST_ROOT) ;
alias boost_system : /boost/system//boost_system : : : <include>$(BOOST_ROOT) ;
}
else
{
local boost-lib-search-path =
<search>/usr/local/opt/boost/lib
<search>/opt/homebrew/lib
;
local boost-include-path =
<include>/usr/local/opt/boost/include
<include>/opt/homebrew/include
;
# the names are decorated in MacPorts.
lib boost_system : : <target-os>darwin <name>boost_system-mt $(boost-lib-search-path)
: : $(boost-include-path) ;
lib boost_system : : <name>boost_system ;
2005-01-11 02:13:07 +00:00
}
make disk_interface the customization point for storage, rather than storage_interface remove the disk cache remove trim_cache disk job remove zero-storage mark default_storage_constructor as deprecated remove storage_interface remove file_pool and default_storage_constructor. update connection_tester to use disk_io_thread. only ftruncate files once optimize hashing, by running sha1 directly on the memory mapped file use boost-multi_index in file_view_pool remove flush_piece and flush_hashed, simplify job-fence logic, remove prep_read_job_impl support noatime split out mmap implementation into a .cpp file support hashing of content in part files. wraps up new disk storage remove flush_piece disk job separate out store_buffer into its own class pass session_settings into storage operations instead of assigning a pointer in the storage object use unordered_map in store_buffer add fopen-based disk io back-end for non-64 bit systems or systems without mmap factor out open_mode_t into its own header first stab at windows memory mapped files support build all of boost for autotools remove flag in async_read callback handler remove old open_mode_t, preadv/readv and coalesce buffers support sparse and no_cache file flags in mmap Remove use of overlapped I/O because we're no longer doing any scatter/gather syscalls the use of overlapped is an unnecessary complication. don't explicitly specify global read and write. On MINGW we need to use libtorrent::read and libtorrent::write instead of the MINGW provided ::read and ::write. If the underlying file is empty then m_mapping is expected to be null. It is the caller's responsibilty to notice that the region's size is zero and not dereference it in that case. Otherwise there is no good way for users of default_storage::open_file to determine that the opened file is empty.
2016-12-29 09:55:17 -08:00
use-project /try_signal : ./deps/try_signal ;
rule linking ( properties * )
{
local result ;
if <simulator>on in $(properties)
{
result += <library>/libsimulator//simulator ;
}
2012-01-26 10:33:39 +00:00
if <target-os>windows in $(properties)
&& ( <asserts>on in $(properties)
|| <asserts>production in $(properties)
2012-01-26 10:33:39 +00:00
|| <asio-debugging>on in $(properties) )
{
result += <library>dbghelp ;
}
2009-11-08 03:09:19 +00:00
# gcrypt libraries, if enabled
if <crypto>gcrypt in $(properties)
2009-11-08 03:09:19 +00:00
{
result += <library>gcrypt ;
2009-11-08 03:09:19 +00:00
}
2018-07-09 20:27:45 -07:00
else if <crypto>openssl in $(properties)
{
result += <library>ssl ;
result += <library>crypto ;
2019-01-23 00:11:59 +01:00
if <target-os>linux in $(properties)
{
result += <library>dl ;
}
2018-07-09 20:27:45 -07:00
}
else if <crypto>gnutls in $(properties)
{
result += <library>./deps/asio-gnutls//asio-gnutls ;
result += <library>gnutls/<link>shared ;
}
2018-07-09 20:27:45 -07:00
else if <crypto>libcrypto in $(properties)
{
result += <library>crypto ;
if <target-os>linux in $(properties)
{
result += <library>dl ;
}
2018-07-09 20:27:45 -07:00
}
else if <crypto>wolfssl in $(properties)
{
result += <library>wolfssl ;
}
2009-11-08 03:09:19 +00:00
if <target-os>windows in $(properties)
|| <target-os>cygwin in $(properties)
{
# socket functions on windows require winsock libraries
result += <library>ws2_32
<library>wsock32
2010-11-29 01:33:05 +00:00
<library>iphlpapi
<define>WIN32_LEAN_AND_MEAN
<define>__USE_W32_SOCKETS
<define>WIN32
<define>_WIN32
;
# when DHT is enabled, we need ed25519 which in turn
# needs entropy
if ! <dht>off in $(properties)
{
result += <library>advapi32 ;
}
# windows xp has no CNG
if ! <windows-version>xp in $(properties)
{
result += <library>bcrypt ;
}
}
if <target-os>android in $(properties)
{
result += <library>dl ;
}
if <target-os>beos in $(properties)
{
2011-07-20 05:14:25 +00:00
result += <library>netkit <library>gcc ;
}
2018-02-04 00:57:54 +00:00
if <target-os>haiku in $(properties)
{
result += <library>libnetwork <library>gcc ;
}
2009-01-27 08:24:48 +00:00
if <target-os>solaris in $(properties)
{
result += <library>libsocket <library>libnsl ;
}
if <target-os>darwin in $(properties)
|| <target-os>iphone in $(properties)
{
# for ip_notifier
result += <framework>CoreFoundation <framework>SystemConfiguration ;
}
if <toolset>gcc in $(properties)
&& <target-os>linux in $(properties)
&& ( <asserts>on in $(properties)
|| <asserts>production in $(properties)
|| <asio-debugging>on in $(properties) )
{
# for backtraces in assertion failures
# which only works on ELF targets with gcc
2022-02-20 21:55:34 +01:00
result += <linkflags>-Wl,--export-dynamic <linkflags>-rdynamic ;
}
else if [ version.version-less $(jam-version) : 1990 0 ]
2022-02-20 21:55:34 +01:00
{
# the visibility feature was introduced in boost-1.69. This was close to
# when the verisoning scheme changed from year to (low) version numbers.
# in boost-1.70
2022-02-20 21:55:34 +01:00
result += <visibility>hidden ;
}
if <boost-link>static in $(properties)
{
if <link>shared in $(properties)
{
# if libtorrent is being built as a shared library
# but we're linking against boost statically, we still
# need to make boost think it's being built as a shared
# library, so that it properly exports its symbols
result += <define>BOOST_ALL_DYN_LINK ;
result += <library>boost_system/<link>static/<define>BOOST_ALL_DYN_LINK ;
}
else
{
result += <library>boost_system/<link>static ;
}
if <toolset>gcc in $(properties)
&& ! <target-os>windows in $(properties)
&& <link>shared in $(properties)
{
result += <fpic>on ;
}
2012-07-23 16:10:34 +00:00
2008-06-07 17:36:33 +00:00
}
else if <boost-link>shared in $(properties)
{
result += <library>boost_system/<link>shared ;
}
else
{
result += <library>boost_system ;
}
result += <define>BOOST_ALL_NO_LIB
<define>BOOST_MULTI_INDEX_DISABLE_SERIALIZATION
<define>BOOST_SYSTEM_NO_DEPRECATED
;
2008-06-07 17:36:33 +00:00
make disk_interface the customization point for storage, rather than storage_interface remove the disk cache remove trim_cache disk job remove zero-storage mark default_storage_constructor as deprecated remove storage_interface remove file_pool and default_storage_constructor. update connection_tester to use disk_io_thread. only ftruncate files once optimize hashing, by running sha1 directly on the memory mapped file use boost-multi_index in file_view_pool remove flush_piece and flush_hashed, simplify job-fence logic, remove prep_read_job_impl support noatime split out mmap implementation into a .cpp file support hashing of content in part files. wraps up new disk storage remove flush_piece disk job separate out store_buffer into its own class pass session_settings into storage operations instead of assigning a pointer in the storage object use unordered_map in store_buffer add fopen-based disk io back-end for non-64 bit systems or systems without mmap factor out open_mode_t into its own header first stab at windows memory mapped files support build all of boost for autotools remove flag in async_read callback handler remove old open_mode_t, preadv/readv and coalesce buffers support sparse and no_cache file flags in mmap Remove use of overlapped I/O because we're no longer doing any scatter/gather syscalls the use of overlapped is an unnecessary complication. don't explicitly specify global read and write. On MINGW we need to use libtorrent::read and libtorrent::write instead of the MINGW provided ::read and ::write. If the underlying file is empty then m_mapping is expected to be null. It is the caller's responsibilty to notice that the region's size is zero and not dereference it in that case. Otherwise there is no good way for users of default_storage::open_file to determine that the opened file is empty.
2016-12-29 09:55:17 -08:00
if <link>shared in $(properties)
{
result += <library>/try_signal//try_signal/<link>static/<fpic>on ;
}
else
{
result += <library>/try_signal//try_signal/<link>static ;
}
return $(result) ;
}
rule warnings ( properties * )
{
local result ;
if <warnings>off in $(properties)
{
return $(result) ;
}
if <toolset>clang in $(properties)
|| <toolset>darwin in $(properties)
{
result += <cxxflags>-Weverything ;
result += <cxxflags>-Wno-documentation ;
result += <cxxflags>-Wno-c++98-compat-pedantic ;
result += <cxxflags>-Wno-c++11-compat-pedantic ;
result += <cxxflags>-Wno-padded ;
result += <cxxflags>-Wno-alloca ;
result += <cxxflags>-Wno-global-constructors ;
result += <cxxflags>-Wno-poison-system-directories ;
2016-11-19 14:19:35 -05:00
# this warns on any global static object, which are used for error_category
# objects
result += <cxxflags>-Wno-exit-time-destructors ;
2015-08-20 01:33:20 +02:00
# enable these warnings again, once the other ones are dealt with
result += <cxxflags>-Wno-weak-vtables ;
result += <cxxflags>-Wno-return-std-move-in-c++11 ;
result += <cxxflags>-Wno-unknown-warning-option ;
2020-02-26 12:10:32 +01:00
# libtorrent uses alloca() carefully
result += <cxxflags>-Wno-alloca ;
}
2015-04-18 14:33:55 +00:00
if <toolset>gcc in $(properties)
{
result += <cflags>-Wall ;
result += <cflags>-Wextra ;
2015-08-20 01:33:20 +02:00
result += <cflags>-Wpedantic ;
result += <cflags>-Wvla ;
result += <cflags>-Wno-format-zero-length ;
result += <cxxflags>-Wno-noexcept-type ;
2015-04-18 14:33:55 +00:00
}
if <toolset>msvc in $(properties)
{
2016-12-13 10:30:36 -05:00
# on msvc this resolves to /W4
result += <warnings>all ;
2015-04-27 02:21:12 +00:00
# enable these warnings again, once the other ones are dealt with
# disable warning C4251: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
result += <cxxflags>/wd4251 ;
# disable warning C4275: non DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier'
result += <cxxflags>/wd4275 ;
# disable warning C4373: virtual function overrides, previous versions of the compiler did not override when parameters only differed by const/volatile qualifiers
result += <cxxflags>/wd4373 ;
# C4268: 'identifier' : 'const' static/global data initialized
# with compiler generated default constructor fills the object with zeros
result += <cxxflags>/wd4268 ;
2017-07-13 20:04:21 -07:00
# C4503: 'identifier': decorated name length exceeded, name was truncated
result += <cxxflags>/wd4503 ;
}
return $(result) ;
}
# rule for adding the right source files
# depending on target-os and features
rule building ( properties * )
{
local result ;
if ( <asserts>off in $(properties) &&
! <invariant-checks>off in $(properties) )
{
ECHO "'invariant-check' requires enabled 'asserts' mode. (e.g. specify build params: invariant-check=on asserts=on)" ;
2017-01-15 15:57:05 +03:00
result += <build>no ;
}
2022-10-16 14:07:06 +02:00
local CXXVER = [ feature.get-values <cxxstd> : $(properties) ] ;
if ! $(CXXVER) || $(CXXVER) < 14
{
ECHO "libtorrent requires at least C++14. Specify cxxstd=14 or higher" ;
result += <build>no ;
}
if <toolset>msvc in $(properties) || <toolset>intel-win in $(properties)
2015-08-20 20:56:52 +02:00
{
# allow larger .obj files (with more sections)
result += <cxxflags>/bigobj ;
2022-01-01 21:43:55 -05:00
# https://docs.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-170
result += <cxxflags>/utf-8 ;
2015-08-20 20:56:52 +02:00
}
if <toolset>gcc in $(properties) && <target-os>windows in $(properties)
{
# allow larger .obj files (with more sections)
result += <cxxflags>-Wa,-mbig-obj ;
}
if ( <asserts>production in $(properties)
2012-01-26 10:33:39 +00:00
|| <asserts>on in $(properties) )
2007-09-01 04:08:39 +00:00
{
result += <source>src/assert.cpp ;
}
if <encryption>on in $(properties)
{
result += <source>src/pe_crypto.cpp ;
}
if ( <toolset>darwin in $(properties)
|| <toolset>gcc in $(properties)
|| <toolset>clang in $(properties)
|| <toolset>clang-darwin in $(properties) )
2012-03-21 16:34:41 +00:00
# on GCC, enabling debugging in libstdc++
# breaks the ABI and its ability to appear
# in shared object interfaces, so when it's
# enabled, just export everything (since we're)
# probably not a production build anyway
2012-12-15 05:09:11 +00:00
&& ! <debug-iterators>on in $(properties)
{
if ( <toolset>gcc in $(properties) )
{
result += <linkflags>-Wl,-Bsymbolic ;
}
}
return $(result) ;
}
2004-03-17 12:14:44 +00:00
rule tag ( name : type ? : property-set )
{
# we only care about the names of our output static- or shared library, not
# other targets like object files
if $(type) != SHARED_LIB && $(type) != STATIC_LIB
{
return [ virtual-target.add-prefix-and-suffix $(name) : $(type) : $(property-set) ] ;
}
# static libraries are not versioned
if $(type) = STATIC_LIB
{
return [ virtual-target.add-prefix-and-suffix $(name)-rasterbar : $(type) : $(property-set) ] ;
}
# shared libraries have the version number before the filename extension on
# windows
if [ $(property-set).get <target-os> ] in windows cygwin
{
# TODO: add version on windows too
# return [ virtual-target.add-prefix-and-suffix $(name)-rasterbar-$(VERSION) : $(type) : $(property-set) ] ;
return [ virtual-target.add-prefix-and-suffix $(name)-rasterbar : $(type) : $(property-set) ] ;
}
else
{
local name = [ virtual-target.add-prefix-and-suffix $(name)-rasterbar : $(type) : $(property-set) ] ;
return $(name).$(VERSION) ;
}
}
# the search path to pick up the openssl libraries from. This is the <search>
# property of those libraries
rule openssl-lib-path ( properties * )
{
local OPENSSL_LIB = [ feature.get-values <openssl-lib> : $(properties) ] ;
if <target-os>darwin in $(properties) && $(OPENSSL_LIB) = ""
{
# on macOS, default to pick up openssl from the homebrew installation
# brew install openssl
# homebrew on M1 Macs install to /opt/homebrew
OPENSSL_LIB = /opt/homebrew/opt/openssl/lib /usr/local/opt/openssl/lib ;
}
else if <target-os>windows in $(properties) && $(OPENSSL_LIB) = ""
{
# the de-facto windows installer is https://slproweb.com/products/Win32OpenSSL.html, which installs to c:\Program Files\OpenSSL-Win{32,64}.
# chocolatey appears to use this installer.
local address_model = [ feature.get-values <address-model> : $(properties) ] ;
OPENSSL_LIB += "C:/Program Files/OpenSSL-Win$(address_model)/lib" ;
OPENSSL_LIB += "C:/Program Files (x86)/OpenSSL-Win$(address_model)/lib" ;
}
local result ;
result += <search>$(OPENSSL_LIB) ;
return $(result) ;
}
# the include path to pick up openssl headers from. This is the
# usage-requirement for the openssl-related libraries
rule openssl-include-path ( properties * )
{
local OPENSSL_INCLUDE = [ feature.get-values <openssl-include> : $(properties) ] ;
if <target-os>darwin in $(properties) && $(OPENSSL_INCLUDE) = ""
{
# on macOS, default to pick up openssl from the homebrew installation
# brew install openssl
# homebrew on M1 Macs install to /opt/homebrew
OPENSSL_INCLUDE = /opt/homebrew/opt/openssl/include /usr/local/opt/openssl/include ;
}
else if <target-os>windows in $(properties) && $(OPENSSL_INCLUDE) = ""
{
# the de-facto windows installer is https://slproweb.com/products/Win32OpenSSL.html, which installs to c:\Program Files\OpenSSL-Win{32,64}.
# chocolatey appears to use this installer.
local address_model = [ feature.get-values <address-model> : $(properties) ] ;
OPENSSL_INCLUDE += "C:/Program Files/OpenSSL-Win$(address_model)/include" ;
OPENSSL_INCLUDE += "C:/Program Files (x86)/OpenSSL-Win$(address_model)/include" ;
}
local result ;
result += <include>$(OPENSSL_INCLUDE) ;
return $(result) ;
}
# the search path to pick up the gnutls libraries from. This is the <search>
# property of those libraries
rule gnutls-lib-path ( properties * )
{
local GNUTLS_LIB = [ feature.get-values <gnutls-lib> : $(properties) ] ;
if <target-os>darwin in $(properties) && $(GNUTLS_LIB) = ""
{
# on macOS, default to pick up openssl from the homebrew installation
# brew install openssl
# homebrew on M1 Macs install to /opt/homebrew
GNUTLS_LIB = /opt/homebrew/opt/gnutls/lib /usr/local/opt/gnutls/lib ;
}
local result ;
result += <search>$(GNUTLS_LIB) ;
return $(result) ;
}
# the include path to pick up gnutls headers from. This is the
# usage-requirement for the gnutls-related libraries
rule gnutls-include-path ( properties * )
{
local GNUTLS_INCLUDE = [ feature.get-values <gnutls-include> : $(properties) ] ;
if <target-os>darwin in $(properties) && $(GNUTLS_INCLUDE) = ""
{
# on macOS, default to pick up openssl from the homebrew installation
# brew install openssl
# homebrew on M1 Macs install to /opt/homebrew
GNUTLS_INCLUDE = /opt/homebrew/opt/gnutls/include /usr/local/opt/gnutls/include ;
}
local result ;
result += <include>$(GNUTLS_INCLUDE) ;
return $(result) ;
}
# the search path to pick up the wolfssl libraries from. This is the <search>
# property of those libraries
rule wolfssl-lib-path ( properties * )
{
local WOLFSSL_LIB = [ feature.get-values <wolfssl-lib> : $(properties) ] ;
if <target-os>linux in $(properties) && $(WOLFSSL_LIB) = ""
{
# on linux, default ./configure install path
WOLFSSL_LIB = /usr/local/lib ;
}
local result ;
result += <search>$(WOLFSSL_LIB) ;
return $(result) ;
}
# the include path to pick up wolfssl headers from. This is the
# usage-requirement for the wolfssl-related libraries
rule wolfssl-include-path ( properties * )
{
local WOLFSSL_INCLUDE = [ feature.get-values <wolfssl-include> : $(properties) ] ;
if <target-os>linux in $(properties) && $(WOLFSSL_INCLUDE) = ""
{
# on linux, default ./configure install path
WOLFSSL_INCLUDE = /usr/local/include ;
}
local result ;
result += <include>$(WOLFSSL_INCLUDE) ;
result += <include>$(WOLFSSL_INCLUDE)/wolfssl ;
return $(result) ;
}
path-constant blacklist-file : tools/sanitizer-blacklist.txt ;
feature openssl-lib : : free path ;
feature openssl-include : : free path ;
feature gnutls-lib : : free path ;
feature gnutls-include : : free path ;
feature wolfssl-lib : : free path ;
feature wolfssl-include : : free path ;
2019-09-14 19:31:31 +02:00
feature test-coverage : off on : composite propagated link-incompatible ;
feature.compose <test-coverage>on : <cxxflags>--coverage <linkflags>--coverage ;
2019-09-14 19:31:31 +02:00
feature predictive-pieces : on off : composite propagated ;
feature.compose <predictive-pieces>off : <define>TORRENT_DISABLE_PREDICTIVE_PIECES ;
2020-03-22 17:10:25 +01:00
feature share-mode : on off : composite propagated ;
feature.compose <share-mode>off : <define>TORRENT_DISABLE_SHARE_MODE ;
feature streaming : on off : composite propagated ;
feature.compose <streaming>off : <define>TORRENT_DISABLE_STREAMING ;
feature super-seeding : on off : composite propagated ;
feature.compose <super-seeding>off : <define>TORRENT_DISABLE_SUPERSEEDING ;
2012-07-31 16:53:37 +00:00
feature i2p : on off : composite propagated ;
feature.compose <i2p>on : <define>TORRENT_USE_I2P=1 ;
feature.compose <i2p>off : <define>TORRENT_USE_I2P=0 ;
feature asserts : off on production system : composite propagated ;
feature.compose <asserts>on : <define>TORRENT_USE_ASSERTS=1 ;
feature.compose <asserts>production : <define>TORRENT_USE_ASSERTS=1 <define>TORRENT_PRODUCTION_ASSERTS=1 ;
feature.compose <asserts>system : <define>TORRENT_USE_ASSERTS=1 <define>TORRENT_USE_SYSTEM_ASSERTS=1 ;
2010-05-06 02:18:08 +00:00
feature windows-version : vista win7 win10 xp : composite propagated ;
2010-12-01 05:47:18 +00:00
feature.compose <windows-version>vista : <define>_WIN32_WINNT=0x0600 ;
feature.compose <windows-version>win7 : <define>_WIN32_WINNT=0x0601 ;
feature.compose <windows-version>win10 : <define>_WIN32_WINNT=0x0A00 ;
feature.compose <windows-version>xp : <define>_WIN32_WINNT=0x0501 ;
2010-12-01 05:47:18 +00:00
feature extensions : on off : composite propagated link-incompatible ;
feature.compose <extensions>off : <define>TORRENT_DISABLE_EXTENSIONS ;
feature asio-debugging : off on : composite propagated link-incompatible ;
feature.compose <asio-debugging>on : <define>TORRENT_ASIO_DEBUGGING ;
2014-07-06 19:18:00 +00:00
feature picker-debugging : off on : composite propagated link-incompatible ;
feature.compose <picker-debugging>on : <define>TORRENT_DEBUG_REFCOUNTS ;
2019-02-19 20:05:26 +01:00
feature mmap-disk-io : on off : composite propagated ;
feature.compose <mmap-disk-io>off : <define>TORRENT_HAVE_MMAP=0 <define>TORRENT_HAVE_MAP_VIEW_OF_FILE=0 ;
2019-02-19 20:05:26 +01:00
feature simulator : off on : composite propagated link-incompatible ;
feature.compose <simulator>on : <define>TORRENT_BUILD_SIMULATOR ;
feature invariant-checks : off on full : composite propagated link-incompatible ;
feature.compose <invariant-checks>on : <define>TORRENT_USE_INVARIANT_CHECKS=1 ;
feature.compose <invariant-checks>full : <define>TORRENT_USE_INVARIANT_CHECKS=1 <define>TORRENT_EXPENSIVE_INVARIANT_CHECKS ;
feature utp-log : off on : composite propagated link-incompatible ;
feature.compose <utp-log>on : <define>TORRENT_UTP_LOG_ENABLE ;
feature simulate-slow-read : off on : composite propagated ;
feature.compose <simulate-slow-read>on : <define>TORRENT_SIMULATE_SLOW_READ ;
feature simulate-slow-write : off on : composite propagated ;
feature.compose <simulate-slow-write>on : <define>TORRENT_SIMULATE_SLOW_WRITE ;
feature logging : on off : composite propagated link-incompatible ;
feature.compose <logging>off : <define>TORRENT_DISABLE_LOGGING ;
2004-10-31 23:16:08 +00:00
feature alert-msg : on off : composite propagated link-incompatible ;
feature.compose <alert-msg>off : <define>TORRENT_DISABLE_ALERT_MSG ;
feature dht : on off : composite propagated link-incompatible ;
feature.compose <dht>off : <define>TORRENT_DISABLE_DHT ;
2004-02-04 11:00:29 +00:00
feature encryption : on off : composite propagated link-incompatible ;
2009-11-08 03:09:19 +00:00
feature.compose <encryption>off : <define>TORRENT_DISABLE_ENCRYPTION ;
feature mutable-torrents : on off : composite propagated link-incompatible ;
feature.compose <mutable-torrents>off : <define>TORRENT_DISABLE_MUTABLE_TORRENTS ;
2021-10-22 12:46:01 +02:00
feature crypto : openssl built-in wolfssl gnutls libcrypto gcrypt : composite propagated ;
feature.compose <crypto>openssl
: <define>TORRENT_USE_LIBCRYPTO
<define>TORRENT_USE_OPENSSL
<define>TORRENT_SSL_PEERS
<define>OPENSSL_NO_SSL2 ;
feature.compose <crypto>wolfssl
: <define>TORRENT_USE_WOLFSSL
<define>TORRENT_USE_LIBCRYPTO
<define>TORRENT_USE_OPENSSL
<define>OPENSSL_NO_SSL2
<define>BOOST_ASIO_USE_WOLFSSL
<define>OPENSSL_ALL
<define>WOLFSSL_SHA512
<define>WOLFSSL_NGINX
<define>WC_NO_HARDEN ;
feature.compose <crypto>gnutls
: <define>TORRENT_USE_GNUTLS
<define>TORRENT_SSL_PEERS ;
feature.compose <crypto>libcrypto : <define>TORRENT_USE_LIBCRYPTO ;
feature.compose <crypto>gcrypt : <define>TORRENT_USE_LIBGCRYPT ;
feature openssl-version : 1.1 pre1.1 : composite propagated ;
feature deprecated-functions : on off : composite propagated link-incompatible ;
feature.compose <deprecated-functions>off : <define>TORRENT_NO_DEPRECATE ;
feature boost-link : default static shared : propagated composite ;
# msvc enables debug iterators by default in debug builds whereas GCC and
# clang do not, that's why "default" is there. msvc has incorrect noexcept
# constructors on some containers when enabling debug iterators, so it's
# possible to turn them off
feature debug-iterators : default off on : composite propagated link-incompatible ;
feature.compose <debug-iterators>on : <define>_GLIBCXX_DEBUG <define>_GLIBCXX_DEBUG_PEDANTIC ;
feature.compose <debug-iterators>off : <define>_ITERATOR_DEBUG_LEVEL=0 ;
feature fpic : off on : composite propagated link-incompatible ;
feature.compose <fpic>on : <cxxflags>-fPIC ;
2014-07-06 19:18:00 +00:00
feature profile-calls : off on : composite propagated link-incompatible ;
feature.compose <profile-calls>on : <define>TORRENT_PROFILE_CALLS=1 ;
# controls whether or not to export some internal
# libtorrent functions. Used for unit testing
feature export-extra : off on : composite propagated ;
# export some internal libtorrent functions
# in order to me able to unit test them.
# this is off by default to keep the export
# symbol table reasonably small
feature.compose <export-extra>on : <define>TORRENT_EXPORT_EXTRA ;
lib advapi32 : : <name>advapi32 ;
lib user32 : : <name>user32 ;
lib shell32 : : <name>shell32 ;
lib gdi32 : : <name>gdi32 ;
lib bcrypt : : <name>bcrypt ;
lib crypt32 : : <name>crypt32 ;
lib z : : <link>shared <name>z ;
# openssl libraries on windows
# technically, crypt32 is not an OpenSSL dependency, but libtorrent needs it on
# windows to access the system certificate store, for authenticating trackers
alias ssl-deps : advapi32 user32 shell32 gdi32 crypt32 ;
# pre OpenSSL 1.1 windows
lib crypto : ssl-deps : <target-os>windows <openssl-version>pre1.1 <name>libeay32
<conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
lib ssl : ssl-deps : <target-os>windows <openssl-version>pre1.1 <name>ssleay32
<use>crypto <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
# OpenSSL 1.1+ windows
2020-11-30 23:07:55 +01:00
lib crypto : ssl-deps : <target-os>windows <openssl-version>1.1 <name>libcrypto
<conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
2020-11-30 23:07:55 +01:00
lib ssl : ssl-deps : <target-os>windows <openssl-version>1.1 <name>libssl <use>crypto
<conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
# generic OpenSSL
lib crypto : : <name>crypto <use>z <conditional>@openssl-lib-path : :
<conditional>@openssl-include-path ;
lib ssl : : <name>ssl <use>crypto <conditional>@openssl-lib-path : :
<conditional>@openssl-include-path ;
lib gnutls : : <name>gnutls <conditional>@gnutls-lib-path : :
<conditional>@gnutls-include-path ;
lib wolfssl : : <name>wolfssl <conditional>@wolfssl-lib-path : :
<conditional>@wolfssl-include-path ;
2012-01-26 10:33:39 +00:00
lib dbghelp : : <name>dbghelp ;
# required for networking on beos
lib netkit : : <name>net <search>/boot/system/lib <link>shared ;
2011-07-20 05:14:25 +00:00
lib gcc : : <name>gcc <link>static ;
# gcrypt on linux/bsd etc.
2009-11-08 03:09:19 +00:00
lib gcrypt : : <name>gcrypt <link>shared <search>/opt/local/lib ;
2011-02-14 04:12:26 +00:00
lib dl : : <link>shared <name>dl ;
lib libsocket : : <use>libnsl <name>socket <link>shared <search>/usr/sfw/lib <link>shared ;
lib libnsl : : <name>nsl <link>shared <search>/usr/sfw/lib <link>shared ;
2018-02-04 00:57:54 +00:00
lib libnetwork : : <name>network <link>shared ;
2009-01-27 08:24:48 +00:00
# socket libraries on windows
lib wsock32 : : <name>wsock32 <link>shared ;
lib ws2_32 : : <name>ws2_32 <link>shared ;
2010-11-29 01:33:05 +00:00
lib iphlpapi : : <name>iphlpapi <link>shared ;
SOURCES =
alert
alert_manager
announce_entry
assert
bandwidth_limit
bandwidth_manager
bandwidth_queue_entry
bdecode
bitfield
bloom_filter
chained_buffer
choker
close_reason
copy_file
cpuid
2014-07-06 19:18:00 +00:00
crc32c
create_torrent
directory
disk_buffer_holder
2014-07-06 19:18:00 +00:00
disk_buffer_pool
2019-02-19 20:05:26 +01:00
disk_interface
2016-06-15 17:49:28 -07:00
disk_io_thread_pool
make disk_interface the customization point for storage, rather than storage_interface remove the disk cache remove trim_cache disk job remove zero-storage mark default_storage_constructor as deprecated remove storage_interface remove file_pool and default_storage_constructor. update connection_tester to use disk_io_thread. only ftruncate files once optimize hashing, by running sha1 directly on the memory mapped file use boost-multi_index in file_view_pool remove flush_piece and flush_hashed, simplify job-fence logic, remove prep_read_job_impl support noatime split out mmap implementation into a .cpp file support hashing of content in part files. wraps up new disk storage remove flush_piece disk job separate out store_buffer into its own class pass session_settings into storage operations instead of assigning a pointer in the storage object use unordered_map in store_buffer add fopen-based disk io back-end for non-64 bit systems or systems without mmap factor out open_mode_t into its own header first stab at windows memory mapped files support build all of boost for autotools remove flag in async_read callback handler remove old open_mode_t, preadv/readv and coalesce buffers support sparse and no_cache file flags in mmap Remove use of overlapped I/O because we're no longer doing any scatter/gather syscalls the use of overlapped is an unnecessary complication. don't explicitly specify global read and write. On MINGW we need to use libtorrent::read and libtorrent::write instead of the MINGW provided ::read and ::write. If the underlying file is empty then m_mapping is expected to be null. It is the caller's responsibilty to notice that the region's size is zero and not dereference it in that case. Otherwise there is no good way for users of default_storage::open_file to determine that the opened file is empty.
2016-12-29 09:55:17 -08:00
disabled_disk_io
2017-01-21 18:36:51 -05:00
disk_job_fence
2014-07-06 19:18:00 +00:00
disk_job_pool
drive_info
entry
error_code
file_storage
escape_string
string_util
file
path
fingerprint
gzip
hasher
hash_picker
2015-04-21 00:23:00 +00:00
hex
http_connection
2008-01-12 09:36:03 +00:00
http_parser
identify_client
ip_filter
ip_helpers
ip_notifier
ip_voter
listen_socket_handle
merkle
2020-05-04 13:10:13 +02:00
merkle_tree
peer_connection
2014-07-06 19:18:00 +00:00
platform_util
bt_peer_connection
web_connection_base
web_peer_connection
2008-12-30 03:54:07 +00:00
http_seed_connection
2015-07-01 21:13:26 -07:00
peer_connection_handle
2009-08-20 03:19:12 +00:00
i2p_stream
instantiate_connection
natpmp
2010-11-29 01:33:05 +00:00
packet_buffer
piece_picker
2014-10-26 07:34:31 +00:00
peer_list
2014-07-06 19:18:00 +00:00
proxy_base
2010-03-16 06:14:22 +00:00
puff
random
read_resume_data
write_resume_data
receive_buffer
resolve_links
session
session_params
session_handle
session_impl
session_call
2014-07-06 19:18:00 +00:00
settings_pack
sha1
sha1_hash
2017-08-01 09:34:33 -07:00
sha256
socket_io
socket_type
socks5_stream
stat
storage_utils
torrent
torrent_handle
torrent_info
2014-07-06 19:18:00 +00:00
torrent_peer
torrent_peer_allocator
torrent_status
2009-11-25 06:55:34 +00:00
time
tracker_manager
http_tracker_connection
udp_tracker_connection
2010-11-29 01:33:05 +00:00
timestamp_history
2007-12-09 04:15:24 +00:00
udp_socket
upnp
utf8
2010-11-29 01:33:05 +00:00
utp_socket_manager
utp_stream
make disk_interface the customization point for storage, rather than storage_interface remove the disk cache remove trim_cache disk job remove zero-storage mark default_storage_constructor as deprecated remove storage_interface remove file_pool and default_storage_constructor. update connection_tester to use disk_io_thread. only ftruncate files once optimize hashing, by running sha1 directly on the memory mapped file use boost-multi_index in file_view_pool remove flush_piece and flush_hashed, simplify job-fence logic, remove prep_read_job_impl support noatime split out mmap implementation into a .cpp file support hashing of content in part files. wraps up new disk storage remove flush_piece disk job separate out store_buffer into its own class pass session_settings into storage operations instead of assigning a pointer in the storage object use unordered_map in store_buffer add fopen-based disk io back-end for non-64 bit systems or systems without mmap factor out open_mode_t into its own header first stab at windows memory mapped files support build all of boost for autotools remove flag in async_read callback handler remove old open_mode_t, preadv/readv and coalesce buffers support sparse and no_cache file flags in mmap Remove use of overlapped I/O because we're no longer doing any scatter/gather syscalls the use of overlapped is an unnecessary complication. don't explicitly specify global read and write. On MINGW we need to use libtorrent::read and libtorrent::write instead of the MINGW provided ::read and ::write. If the underlying file is empty then m_mapping is expected to be null. It is the caller's responsibilty to notice that the region's size is zero and not dereference it in that case. Otherwise there is no good way for users of default_storage::open_file to determine that the opened file is empty.
2016-12-29 09:55:17 -08:00
file_view_pool
lsd
enum_net
magnet_uri
parse_url
2014-05-03 21:10:44 +00:00
xml_parse
version
2014-07-06 19:18:00 +00:00
peer_class
peer_class_set
part_file
stat_cache
request_blocks
session_stats
performance_counters
resolver
session_settings
proxy_settings
file_progress
ffs
add_torrent_params
peer_info
stack_allocator
generate_peer_id
make disk_interface the customization point for storage, rather than storage_interface remove the disk cache remove trim_cache disk job remove zero-storage mark default_storage_constructor as deprecated remove storage_interface remove file_pool and default_storage_constructor. update connection_tester to use disk_io_thread. only ftruncate files once optimize hashing, by running sha1 directly on the memory mapped file use boost-multi_index in file_view_pool remove flush_piece and flush_hashed, simplify job-fence logic, remove prep_read_job_impl support noatime split out mmap implementation into a .cpp file support hashing of content in part files. wraps up new disk storage remove flush_piece disk job separate out store_buffer into its own class pass session_settings into storage operations instead of assigning a pointer in the storage object use unordered_map in store_buffer add fopen-based disk io back-end for non-64 bit systems or systems without mmap factor out open_mode_t into its own header first stab at windows memory mapped files support build all of boost for autotools remove flag in async_read callback handler remove old open_mode_t, preadv/readv and coalesce buffers support sparse and no_cache file flags in mmap Remove use of overlapped I/O because we're no longer doing any scatter/gather syscalls the use of overlapped is an unnecessary complication. don't explicitly specify global read and write. On MINGW we need to use libtorrent::read and libtorrent::write instead of the MINGW provided ::read and ::write. If the underlying file is empty then m_mapping is expected to be null. It is the caller's responsibilty to notice that the region's size is zero and not dereference it in that case. Otherwise there is no good way for users of default_storage::open_file to determine that the opened file is empty.
2016-12-29 09:55:17 -08:00
mmap
mmap_disk_io
2022-02-07 03:29:03 +01:00
mmap_disk_job
mmap_storage
make disk_interface the customization point for storage, rather than storage_interface remove the disk cache remove trim_cache disk job remove zero-storage mark default_storage_constructor as deprecated remove storage_interface remove file_pool and default_storage_constructor. update connection_tester to use disk_io_thread. only ftruncate files once optimize hashing, by running sha1 directly on the memory mapped file use boost-multi_index in file_view_pool remove flush_piece and flush_hashed, simplify job-fence logic, remove prep_read_job_impl support noatime split out mmap implementation into a .cpp file support hashing of content in part files. wraps up new disk storage remove flush_piece disk job separate out store_buffer into its own class pass session_settings into storage operations instead of assigning a pointer in the storage object use unordered_map in store_buffer add fopen-based disk io back-end for non-64 bit systems or systems without mmap factor out open_mode_t into its own header first stab at windows memory mapped files support build all of boost for autotools remove flag in async_read callback handler remove old open_mode_t, preadv/readv and coalesce buffers support sparse and no_cache file flags in mmap Remove use of overlapped I/O because we're no longer doing any scatter/gather syscalls the use of overlapped is an unnecessary complication. don't explicitly specify global read and write. On MINGW we need to use libtorrent::read and libtorrent::write instead of the MINGW provided ::read and ::write. If the underlying file is empty then m_mapping is expected to be null. It is the caller's responsibilty to notice that the region's size is zero and not dereference it in that case. Otherwise there is no good way for users of default_storage::open_file to determine that the opened file is empty.
2016-12-29 09:55:17 -08:00
posix_disk_io
posix_part_file
make disk_interface the customization point for storage, rather than storage_interface remove the disk cache remove trim_cache disk job remove zero-storage mark default_storage_constructor as deprecated remove storage_interface remove file_pool and default_storage_constructor. update connection_tester to use disk_io_thread. only ftruncate files once optimize hashing, by running sha1 directly on the memory mapped file use boost-multi_index in file_view_pool remove flush_piece and flush_hashed, simplify job-fence logic, remove prep_read_job_impl support noatime split out mmap implementation into a .cpp file support hashing of content in part files. wraps up new disk storage remove flush_piece disk job separate out store_buffer into its own class pass session_settings into storage operations instead of assigning a pointer in the storage object use unordered_map in store_buffer add fopen-based disk io back-end for non-64 bit systems or systems without mmap factor out open_mode_t into its own header first stab at windows memory mapped files support build all of boost for autotools remove flag in async_read callback handler remove old open_mode_t, preadv/readv and coalesce buffers support sparse and no_cache file flags in mmap Remove use of overlapped I/O because we're no longer doing any scatter/gather syscalls the use of overlapped is an unnecessary complication. don't explicitly specify global read and write. On MINGW we need to use libtorrent::read and libtorrent::write instead of the MINGW provided ::read and ::write. If the underlying file is empty then m_mapping is expected to be null. It is the caller's responsibilty to notice that the region's size is zero and not dereference it in that case. Otherwise there is no good way for users of default_storage::open_file to determine that the opened file is empty.
2016-12-29 09:55:17 -08:00
posix_storage
ssl
truncate
2022-06-05 23:11:29 +02:00
load_torrent
# -- extensions --
ut_pex
ut_metadata
smart_ban
;
KADEMLIA_SOURCES =
dht_state
dht_storage
dht_tracker
msg
node
node_entry
refresh
rpc_manager
find_data
node_id
routing_table
traversal_algorithm
2014-07-06 19:18:00 +00:00
dos_blocker
get_peers
item
get_item
2015-09-22 14:10:57 -04:00
put_data
ed25519
2017-06-12 05:54:11 -04:00
sample_infohashes
dht_settings
2004-02-21 11:52:21 +00:00
;
2004-02-08 16:04:50 +00:00
ED25519_SOURCES =
add_scalar
fe
ge
key_exchange
keypair
sc
sign
verify
hasher512
sha512
;
2015-05-17 23:32:13 +00:00
local usage-requirements =
<include>./include
2008-05-20 09:45:55 +00:00
<include>./include/libtorrent
<variant>release:<define>NDEBUG
<define>_FILE_OFFSET_BITS=64
2010-11-29 01:33:05 +00:00
# enable cancel support in asio
<define>BOOST_ASIO_ENABLE_CANCELIO
2016-04-30 20:09:02 -04:00
# make sure asio uses std::chrono
<define>BOOST_ASIO_HAS_STD_CHRONO
2019-02-13 14:42:12 +01:00
<define>BOOST_ASIO_NO_DEPRECATED
<conditional>@linking
2007-09-01 04:08:39 +00:00
# msvc optimizations
<toolset>msvc,<variant>release:<linkflags>"/OPT:ICF=5"
<toolset>msvc,<variant>release:<linkflags>"/OPT:REF"
# disable bogus deprecation warnings on msvc8
<target-os>windows:<define>_SCL_SECURE_NO_DEPRECATE
<target-os>windows:<define>_CRT_SECURE_NO_DEPRECATE
<cxxflags>"$(CXXFLAGS:J= )"
;
2008-06-23 13:17:15 +00:00
project torrent ;
2008-06-23 13:17:15 +00:00
lib torrent
: # sources
src/$(SOURCES).cpp
: # requirements
<threading>multi
<define>TORRENT_BUILDING_LIBRARY
<link>shared:<define>TORRENT_BUILDING_SHARED
2014-07-06 19:18:00 +00:00
<define>BOOST_NO_DEPRECATED
2012-06-12 16:38:15 +00:00
<link>shared:<define>BOOST_SYSTEM_SOURCE
2012-04-15 04:00:58 +00:00
<dht>on:<source>src/kademlia/$(KADEMLIA_SOURCES).cpp
<dht>on:<source>src/ed25519/$(ED25519_SOURCES).cpp
<conditional>@building
<conditional>@warnings
<tag>@tag
$(usage-requirements)
<linkflags>"$(LDFLAGS:J= )"
: # default build
<threading>multi
<cxxstd>14
<c++-template-depth>512
: # usage requirements
$(usage-requirements)
2012-06-03 05:13:08 +00:00
<link>shared:<define>TORRENT_LINKING_SHARED
;
# install rules
2021-05-29 22:34:23 +02:00
# return libdir and includedir
rule install-paths ( properties * )
{
import version ;
# package.paths was introduced in boost-1.70 (2018.02)
# however, boost build's versioning scheme changed in boost-1.71 to version
# 4.0
# so, if versions are 4.0+ we want to use package.paths, but if it's a year,
# say 2018, that means it's old and we use the fallback below. Any version <
# 1990 is considered the 4.0 and later numbering scheme.
if [ version.version-less 1990 0 : $(jam-version) ]
{
import option ;
import property ;
local prefix = [ option.get prefix : [ property.select <install-default-prefix> : $(properties) ] ] ;
prefix = $(prefix:G=) ;
# Or some likely defaults if neither is given.
if ! $(prefix)
{
if [ modules.peek : NT ] { prefix = C:\\$(package-name) ; }
else if [ modules.peek : UNIX ] { prefix = /usr/local ; }
}
2021-05-29 22:34:23 +02:00
return $(prefix)/lib $(prefix)/include ;
}
else
{
local p = [ package.paths libtorrent : $(properties) ] ;
2021-05-29 22:34:23 +02:00
return [ $(p).libdir ] [ $(p).includedir ] ;
}
2021-05-29 22:34:23 +02:00
}
rule generate-pkg-config ( properties * )
{
import property-set ;
import project ;
local l = [ project.target [ project.module-name "." ] ] ;
# this is the libtorrent library target
local t = [ $(l).find torrent : . ] ;
# these are the properties we're using to build it with
local props = [ $(t).generate [ property-set.create $(properties) ] ] ;
local libname = [ $(props[2]).name ] ;
props = $(props[1]) ;
p = [ install-paths $(properties) ] ;
local libdir = $(p[1]) ;
local includes = $(p[2]) ;
local defines ;
local shared_deps ;
local private_deps ;
for d in [ feature.expand $(properties) ] [ $(props).raw ] {
switch $(d)
{
case \<define\>TORRENT_* : {
d = [ SPLIT_BY_CHARACTERS $(d) : ">" ] ;
defines += $(d[2]) ;
}
case \<define\>BOOST_* : {
d = [ SPLIT_BY_CHARACTERS $(d) : ">" ] ;
defines += $(d[2]) ;
}
case \<include\>* : {
d = [ SPLIT_BY_CHARACTERS $(d) : ">" ] ;
d = $(d[2]) ;
if ( [ path.is-rooted $(d) ] )
{
includes += $(d) ;
}
}
case \<library\>* : {
d = [ SPLIT_BY_CHARACTERS $(d) : ">" ] ;
# this is the target
local t = $(d[2]) ;
if [ $(t).type ] = SHARED_LIB
{
local path = [ $(t).path ] ;
if $(path) != ""
{
libdir += $(path) ;
}
shared_deps += [ $(t).name ] ;
}
else if [ $(t).type ] = SEARCHED_LIB
{
local path = [ $(t).search ] ;
if $(path) != ""
{
libdir += $(path) ;
}
shared_deps += [ $(t).name ] ;
}
else if ( [ $(t).type ] = STATIC_LIB )
{
private_deps += [ $(t).name ] ;
}
}
}
}
# TODO: use $(libname) in future versions
local config = "Name: libtorrent-rasterbar"
"\nDescription: libtorrent is an open source C++ library implementing the BitTorrent protocol"
"\nURL: https://libtorrent.org"
"\nVersion: $(VERSION)"
"\nLibs:"
" -L\"$(libdir)\""
" -ltorrent-rasterbar"
" -l$(shared_deps)"
"\nLibs.private:"
" -L\"$(libdir)\""
" -l$(private_deps)"
"\nCflags:"
" -D$(defines)"
" -I\"$(includes)\""
"\n"
;
local dummy = @("libtorrent-rasterbar.pc":E=$(config)) ;
}
rule install-pkg-config ( target-name : data * : requirements * )
{
import stage ;
2021-07-25 16:14:11 -07:00
local p = [ install-paths $(requirements) ] ;
local libdir = $(p[0]) ;
2021-07-25 16:14:11 -07:00
stage.install $(target-name)
: $(data)
: $(requirements) <location>$(libdir)/pkgconfig
;
import project ;
2021-07-25 16:14:11 -07:00
local c = [ project.current ] ;
local project-module = [ $(c).project-module ] ;
module $(project-module)
{
explicit $(1) ;
}
}
headers = [ path.glob-tree include/libtorrent : *.hpp ] ;
package.install install-torrent-lib
: <install-source-root>libtorrent
2015-05-17 23:32:13 +00:00
:
: torrent
: $(headers)
;
2019-05-11 18:28:48 -06:00
package.install-data install-cmake-module
: cmake/Modules
: examples/cmake/FindLibtorrentRasterbar.cmake
;
install-pkg-config pkg-config-target : libtorrent-rasterbar.pc : <conditional>@generate-pkg-config ;
alias install : install-torrent-lib install-cmake-module pkg-config-target ;
explicit install ;
# testing headers targets
2019-05-11 18:28:48 -06:00
local header_targets ;
for local target in $(headers)
{
if ! [ path.basename $(target) ] in storage.hpp windows.hpp win_util.hpp win_crypto_provider.hpp torrent_impl.hpp io_service.hpp
2019-05-11 18:28:48 -06:00
{
# this cast tells boost build that the header files really *are* cpp files
# otherwise the object rule doesn't know which language to interpret them as
obj header-build/$(target).o : [ cast.cast _ cpp : $(target) ]
: <library>torrent <cxxflags>-fsyntax-only
2019-08-10 12:34:53 -07:00
: <cxxstd>14 ;
2019-05-11 18:28:48 -06:00
explicit header-build/$(target).o ;
header_targets += $(target) ;
}
}
alias check-headers : header-build/$(header_targets).o ;
explicit check-headers ;