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