mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 15:15:28 +00:00
86 lines
2.0 KiB
Plaintext
86 lines
2.0 KiB
Plaintext
import feature : feature ;
|
|
|
|
project libdatachannel ;
|
|
path-constant CWD : . ;
|
|
|
|
lib libdatachannel
|
|
: # sources
|
|
[ glob ./src/*.cpp ]
|
|
: # requirements
|
|
<cxxstd>17
|
|
<include>./include/rtc
|
|
<define>USE_JUICE=1
|
|
<define>RTC_ENABLE_MEDIA=0
|
|
<define>RTC_ENABLE_WEBSOCKET=0
|
|
<library>/libdatachannel//usrsctp
|
|
<library>/libdatachannel//juice
|
|
<library>/libdatachannel//plog
|
|
: # default build
|
|
<link>static
|
|
: # usage requirements
|
|
<include>./include
|
|
<library>/libdatachannel//plog
|
|
<cxxflags>-pthread
|
|
<toolset>gcc:<cxxflags>"-Wno-pedantic -Wno-unused-parameter -Wno-unused-variable"
|
|
<toolset>clang:<cxxflags>"-Wno-pedantic -Wno-unused-parameter -Wno-unused-variable"
|
|
;
|
|
|
|
feature gnutls : off on : composite propagated ;
|
|
feature.compose <gnutls>off
|
|
: <define>USE_GNUTLS=0 ;
|
|
feature.compose <gnutls>on
|
|
: <define>USE_GNUTLS=1 ;
|
|
|
|
alias plog
|
|
: # no sources
|
|
: # no build requirements
|
|
: # no default build
|
|
: # usage requirements
|
|
<include>./deps/plog/include
|
|
;
|
|
|
|
alias usrsctp
|
|
: # no sources
|
|
: # no build requirements
|
|
: # no default build
|
|
: # usage requirements
|
|
<include>./deps/usrsctp/usrsctplib
|
|
<library>libusrsctp.a
|
|
;
|
|
|
|
alias juice
|
|
: # no sources
|
|
: # no build requirements
|
|
: # no default build
|
|
: # usage requirements
|
|
<include>./deps/libjuice/include
|
|
<library>libjuice.a
|
|
;
|
|
|
|
make libusrsctp.a : : @make_libusrsctp ;
|
|
actions make_libusrsctp
|
|
{
|
|
(cd $(CWD)/deps/usrsctp && cmake -B build -D CMAKE_C_FLAGS="-fPIC" && cd build && make -j2 usrsctplib-static)
|
|
cp $(CWD)/deps/usrsctp/build/usrsctplib/libusrsctp.a $(<)
|
|
}
|
|
|
|
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 && cmake -B build -D CMAKE_C_FLAGS="-fPIC" && cd build && make -j2 juice-static)
|
|
cp $(CWD)/deps/libjuice/build/libjuice-static.a $(<)
|
|
}
|
|
|