Jamfile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. import feature : feature ;
  2. project libdatachannel ;
  3. path-constant CWD : . ;
  4. lib libdatachannel
  5. : # sources
  6. [ glob ./src/*.cpp ]
  7. : # requirements
  8. <cxxstd>17
  9. <include>./include/rtc
  10. <define>USE_JUICE=1
  11. <define>RTC_ENABLE_MEDIA=0
  12. <define>RTC_ENABLE_WEBSOCKET=0
  13. <library>/libdatachannel//usrsctp
  14. <library>/libdatachannel//juice
  15. <library>/libdatachannel//plog
  16. : # default build
  17. <link>static
  18. : # usage requirements
  19. <include>./include
  20. <library>/libdatachannel//plog
  21. <cxxflags>-pthread
  22. <toolset>gcc:<cxxflags>"-Wno-pedantic -Wno-unused-parameter -Wno-unused-variable"
  23. <toolset>clang:<cxxflags>"-Wno-pedantic -Wno-unused-parameter -Wno-unused-variable"
  24. ;
  25. feature gnutls : off on : composite propagated ;
  26. feature.compose <gnutls>off
  27. : <define>USE_GNUTLS=0 ;
  28. feature.compose <gnutls>on
  29. : <define>USE_GNUTLS=1 ;
  30. alias plog
  31. : # no sources
  32. : # no build requirements
  33. : # no default build
  34. : # usage requirements
  35. <include>./deps/plog/include
  36. ;
  37. alias usrsctp
  38. : # no sources
  39. : # no build requirements
  40. : # no default build
  41. : # usage requirements
  42. <include>./deps/usrsctp/usrsctplib
  43. <library>libusrsctp.a
  44. ;
  45. alias juice
  46. : # no sources
  47. : # no build requirements
  48. : # no default build
  49. : # usage requirements
  50. <include>./deps/libjuice/include
  51. <library>libjuice.a
  52. ;
  53. make libusrsctp.a : : @make_libusrsctp ;
  54. actions make_libusrsctp
  55. {
  56. (cd $(CWD)/deps/usrsctp && cmake -B build -D CMAKE_C_FLAGS="-fPIC" && cd build && make -j2 usrsctplib-static)
  57. cp $(CWD)/deps/usrsctp/build/usrsctplib/libusrsctp.a $(<)
  58. }
  59. make libjuice.a : : @make_libjuice ;
  60. rule make_libjuice ( targets * : sources * : properties * )
  61. {
  62. if <crypto>gnutls in $(properties)
  63. {
  64. MAKEOPTS on $(targets) = "USE_NETTLE=1" ;
  65. }
  66. else
  67. {
  68. MAKEOPTS on $(targets) = "USE_NETTLE=0" ;
  69. }
  70. }
  71. actions make_libjuice
  72. {
  73. (cd $(CWD)/deps/libjuice && cmake -B build -D CMAKE_C_FLAGS="-fPIC" && cd build && make -j2 juice-static)
  74. cp $(CWD)/deps/libjuice/build/libjuice-static.a $(<)
  75. }