forked from premiere/premiere-libtorrent
clean up openssl dependency handling in Jamfile
This commit is contained in:
parent
f080149081
commit
75f6b95050
91
Jamfile
91
Jamfile
|
@ -59,44 +59,6 @@ else
|
||||||
|
|
||||||
VERSION = 1.1.5 ;
|
VERSION = 1.1.5 ;
|
||||||
|
|
||||||
# rule for linking the correct libraries depending
|
|
||||||
# on features and target-os
|
|
||||||
rule link-openssl ( properties * )
|
|
||||||
{
|
|
||||||
local result ;
|
|
||||||
|
|
||||||
# openssl libraries, if enabled
|
|
||||||
# exclude gcc from a regular windows build to make mingw
|
|
||||||
# link against the regular unix library name
|
|
||||||
if <openssl-version>pre1.1 in $(properties)
|
|
||||||
&& <target-os>windows in $(properties)
|
|
||||||
&& ! <toolset>gcc in $(properties)
|
|
||||||
{
|
|
||||||
result += <library>ssleay32
|
|
||||||
<library>libeay32
|
|
||||||
;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
# on windows the library names were changed to be in line with other
|
|
||||||
# system starting with OpenSSL 1.1
|
|
||||||
result += <library>crypto <library>ssl ;
|
|
||||||
}
|
|
||||||
|
|
||||||
# windows needs some more libraries when using openSSL
|
|
||||||
if <target-os>windows in $(properties)
|
|
||||||
&& ! <toolset>gcc in $(properties)
|
|
||||||
{
|
|
||||||
result += <library>advapi32
|
|
||||||
<library>user32
|
|
||||||
<library>shell32
|
|
||||||
<library>gdi32
|
|
||||||
;
|
|
||||||
}
|
|
||||||
echo "link openssl = " $(result) ;
|
|
||||||
return $(result) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
rule linking ( properties * )
|
rule linking ( properties * )
|
||||||
{
|
{
|
||||||
local result ;
|
local result ;
|
||||||
|
@ -414,7 +376,6 @@ rule openssl-lib-path ( properties * )
|
||||||
|
|
||||||
local result ;
|
local result ;
|
||||||
result += <search>$(OPENSSL_LIB) ;
|
result += <search>$(OPENSSL_LIB) ;
|
||||||
echo "openssl-lib-path = " $(result) ;
|
|
||||||
return $(result) ;
|
return $(result) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,7 +410,6 @@ rule openssl-include-path ( properties * )
|
||||||
|
|
||||||
local result ;
|
local result ;
|
||||||
result += <include>$(OPENSSL_INCLUDE) ;
|
result += <include>$(OPENSSL_INCLUDE) ;
|
||||||
echo "openssl-include-path = " $(result) ;
|
|
||||||
return $(result) ;
|
return $(result) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -601,16 +561,50 @@ variant test_barebones : debug
|
||||||
<export-extra>on <debug-iterators>on <threading>multi <asserts>on
|
<export-extra>on <debug-iterators>on <threading>multi <asserts>on
|
||||||
;
|
;
|
||||||
|
|
||||||
lib crypto : : <name>crypto <use>z <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
|
# windows variants for libssl and libcrypto (they have different names and some
|
||||||
lib ssl : : <name>ssl <use>crypto <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
|
# additional dependencies)
|
||||||
|
|
||||||
# required for openssl on windows
|
|
||||||
lib ssleay32 : : <name>ssleay32 <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
|
|
||||||
lib libeay32 : : <name>libeay32 <conditional>@openssl-lib-path : : <conditional>@openssl-include-path ;
|
|
||||||
lib advapi32 : : <name>advapi32 ;
|
lib advapi32 : : <name>advapi32 ;
|
||||||
lib user32 : : <name>user32 ;
|
lib user32 : : <name>user32 ;
|
||||||
lib shell32 : : <name>shell32 ;
|
lib shell32 : : <name>shell32 ;
|
||||||
lib gdi32 : : <name>gdi32 ;
|
lib gdi32 : : <name>gdi32 ;
|
||||||
|
|
||||||
|
lib crypto
|
||||||
|
: # sources
|
||||||
|
: # requirements
|
||||||
|
<target-os>windows
|
||||||
|
<openssl-version>pre1.1
|
||||||
|
<name>libeay32
|
||||||
|
<conditional>@openssl-lib-path
|
||||||
|
: # default-build
|
||||||
|
: # usage-requirements
|
||||||
|
<conditional>@openssl-include-path
|
||||||
|
<library>advapi32
|
||||||
|
<library>user32
|
||||||
|
<library>shell32
|
||||||
|
<library>gdi32
|
||||||
|
;
|
||||||
|
|
||||||
|
lib ssl
|
||||||
|
: # sources
|
||||||
|
: # requirements
|
||||||
|
<target-os>windows
|
||||||
|
<openssl-version>pre1.1
|
||||||
|
<name>ssleay32
|
||||||
|
<use>crypto
|
||||||
|
<conditional>@openssl-lib-path
|
||||||
|
: # default-build
|
||||||
|
: # usage-requirments
|
||||||
|
<conditional>@openssl-include-path
|
||||||
|
<library>advapi32
|
||||||
|
<library>user32
|
||||||
|
<library>shell32
|
||||||
|
<library>gdi32
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
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 dbghelp : : <name>dbghelp ;
|
lib dbghelp : : <name>dbghelp ;
|
||||||
|
|
||||||
# required for networking on beos
|
# required for networking on beos
|
||||||
|
@ -625,8 +619,6 @@ lib gcrypt : : <name>gcrypt <link>shared <search>/opt/local/lib ;
|
||||||
lib z : : <link>shared <name>z ;
|
lib z : : <link>shared <name>z ;
|
||||||
lib dl : : <link>shared <name>dl ;
|
lib dl : : <link>shared <name>dl ;
|
||||||
|
|
||||||
alias openssl-libraries : : : : <conditional>@link-openssl ;
|
|
||||||
|
|
||||||
# time functions used on linux require librt
|
# time functions used on linux require librt
|
||||||
lib librt : : <name>rt <link>shared ;
|
lib librt : : <name>rt <link>shared ;
|
||||||
|
|
||||||
|
@ -830,7 +822,8 @@ lib torrent
|
||||||
<link>shared:<define>TORRENT_BUILDING_SHARED
|
<link>shared:<define>TORRENT_BUILDING_SHARED
|
||||||
<define>BOOST_NO_DEPRECATED
|
<define>BOOST_NO_DEPRECATED
|
||||||
<link>shared:<define>BOOST_SYSTEM_SOURCE
|
<link>shared:<define>BOOST_SYSTEM_SOURCE
|
||||||
<crypto>openssl:<library>openssl-libraries
|
<crypto>openssl:<library>ssl
|
||||||
|
<crypto>openssl:<library>crypto
|
||||||
|
|
||||||
<dht>on:<source>src/kademlia/$(KADEMLIA_SOURCES).cpp
|
<dht>on:<source>src/kademlia/$(KADEMLIA_SOURCES).cpp
|
||||||
<dht>on:<source>ed25519/src/$(ED25519_SOURCES).cpp
|
<dht>on:<source>ed25519/src/$(ED25519_SOURCES).cpp
|
||||||
|
|
Loading…
Reference in New Issue