| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- 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
- <toolset>gcc:<cxxflags>"-pthread -Wno-pedantic -Wno-unused-parameter -Wno-unused-variable"
- <toolset>clang:<cxxflags>"-pthread -Wno-pedantic -Wno-unused-parameter -Wno-unused-variable"
- <toolset>msvc:<cxxflags>"-DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING"
- ;
- 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 usrsctp
- : # no sources
- : <toolset>msvc
- : # no default build
- : # usage requirements
- <include>./deps/usrsctp/usrsctplib
- <library>libusrsctp.lib
- ;
- alias juice
- : # no sources
- : # no build requirements
- : # no default build
- : # usage requirements
- <include>./deps/libjuice/include
- <library>libjuice-static.a
- ;
- alias juice
- : # no sources
- : <toolset>msvc
- : # no default build
- : # usage requirements
- <include>./deps/libjuice/include
- <library>libjuice-static.lib
- ;
- make libusrsctp.a : : @make_libusrsctp ;
- make libusrsctp.lib : : @make_libusrsctp_msvc ;
- 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 $(<)
- }
- actions make_libusrsctp_msvc
- {
- (cd $(CWD)/deps/usrsctp && cmake -B build -G "NMake Makefiles" && cd build && nmake usrsctplib-static)
- cp $(CWD)/deps/usrsctp/build/usrsctplib/libusrsctp.lib $(<)
- }
- make libjuice-static.a : : @make_libjuice ;
- make libjuice-static.lib : : @make_libjuice_msvc ;
- rule make_libjuice ( targets * : sources * : properties * )
- {
- if <crypto>gnutls in $(properties)
- {
- CMAKEOPTS on $(targets) = "-D USE_NETTLE=1" ;
- }
- else
- {
- CMAKEOPTS on $(targets) = "-D USE_NETTLE=0" ;
- }
- }
- actions make_libjuice
- {
- (cd $(CWD)/deps/libjuice && cmake -B build -D CMAKE_C_FLAGS="-fPIC" $(CMAKEOPTS) && cd build && make -j2 juice-static)
- cp $(CWD)/deps/libjuice/build/libjuice-static.a $(<)
- }
- rule make_libjuice_msvc ( targets * : sources * : properties * )
- {
- if <crypto>gnutls in $(properties)
- {
- CMAKEOPTS on $(targets) = "-D USE_NETTLE=1" ;
- }
- else
- {
- CMAKEOPTS on $(targets) = "-D USE_NETTLE=0" ;
- }
- }
- actions make_libjuice_msvc
- {
- (cd $(CWD)/deps/libjuice && cmake -B build -G "NMake Makefiles" $(CMAKEOPTS) && cd build && nmake juice-static)
- cp $(CWD)/deps/libjuice/build/libjuice-static.lib $(<)
- }
|