Updated Jamfile to allow GnuTLS

This commit is contained in:
Paul-Louis Ageneau
2020-05-17 23:13:30 +02:00
parent 88c88bbaf5
commit 6a7296d40d

27
Jamfile
View File

@ -1,3 +1,5 @@
import feature : feature ;
project libdatachannel ;
path-constant CWD : . ;
@ -5,21 +7,26 @@ lib libdatachannel
: # sources
[ glob ./src/*.cpp ]
: # requirements
<cxxstd>17
<include>./include/rtc
<define>USE_GNUTLS=0
<define>USE_JUICE=1
<cxxflags>"`pkg-config --cflags openssl`"
<library>/libdatachannel//usrsctp
<library>/libdatachannel//juice
<library>/libdatachannel//plog
: # default build
<link>static
: # usage requirements
<include>./include
<library>/libdatachannel//plog
<cxxflags>-pthread
<linkflags>"`pkg-config --libs openssl`"
;
feature crypto : openssl gnutls : composite propagated ;
feature.compose <crypto>openssl
: <define>USE_GNUTLS=0 ;
feature.compose <crypto>gnutls
: <define>USE_GNUTLS=1 ;
alias plog
: # no sources
: # no build requirements
@ -57,9 +64,21 @@ actions make_libusrsctp
}
make libjuice.a : : @make_libjuice ;
rule make_libjuice ( targets * : sources * : properties * )
{
if <crypto>gnutls in $(properties)
{
MAKEOPTS on $(targets) = "USE_NETTLE=1" ;
}
else
{
MAKEOPTS on $(targets) = "USE_NETTLE=0" ;
}
}
actions make_libjuice
{
(cd $(CWD)/deps/libjuice && make USE_NETTLE=0)
(cd $(CWD)/deps/libjuice && make $(MAKEOPTS))
cp $(CWD)/deps/libjuice/libjuice.a $(<)
}