diff --git a/Jamfile b/Jamfile index 4b19aa4..db3a563 100644 --- a/Jamfile +++ b/Jamfile @@ -1,3 +1,5 @@ +import feature : feature ; + project libdatachannel ; path-constant CWD : . ; @@ -5,21 +7,26 @@ lib libdatachannel : # sources [ glob ./src/*.cpp ] : # requirements + 17 ./include/rtc - USE_GNUTLS=0 USE_JUICE=1 - "`pkg-config --cflags openssl`" /libdatachannel//usrsctp /libdatachannel//juice + /libdatachannel//plog : # default build static : # usage requirements ./include /libdatachannel//plog -pthread - "`pkg-config --libs openssl`" ; +feature crypto : openssl gnutls : composite propagated ; +feature.compose openssl + : USE_GNUTLS=0 ; +feature.compose gnutls + : 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 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 $(<) }