jamroot.jam 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # (c) Copyright Juergen Hunold 2008
  2. # Use, modification, and distribution are subject to the
  3. # Boost Software License, Version 1.0. (See accompanying file
  4. # LICENSE.txt or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
  5. import qt4 ;
  6. import testing ;
  7. import cast ;
  8. if [ qt4.initialized ]
  9. {
  10. use-project /boost : ../../../.. ;
  11. project qttest
  12. : requirements
  13. <library>/boost/test//boost_unit_test_framework
  14. ;
  15. alias qt-tests :
  16. # Check for explicit libraries, <use>/qt should not link any lib
  17. [ link-fail qtcorefail.cpp : <use>/qt ]
  18. [ run qtcore.cpp /qt//QtCore ]
  19. [ run qtsql.cpp /qt//QtSql ]
  20. [ run qtxml.cpp /qt//QtXml ]
  21. [ run qtnetwork.cpp /qt//QtNetwork ]
  22. [ run qtscript.cpp /qt//QtScript ]
  23. [ run qtscripttools.cpp /qt//QtScriptTools ]
  24. [ run qtxmlpatterns.cpp /qt//QtXmlPatterns ]
  25. # ToDo: runable example code
  26. [ link qtsvg.cpp /qt//QtSvg ]
  27. [ link qtgui.cpp /qt//QtGui ]
  28. # Multimedia toolkits.
  29. [ link qtwebkit.cpp /qt//QtWebKit ]
  30. [ link phonon.cpp /qt//phonon ]
  31. [ link qtmultimedia.cpp /qt//QtMultimedia ]
  32. # QML
  33. [ link qtdeclarative.cpp /qt//QtDeclarative ]
  34. # Help systems.
  35. [ link qthelp.cpp /qt//QtHelp ]
  36. [ link qtassistant.cpp /qt//QtAssistantClient : <conditional>@check_for_assistant ]
  37. # Check working and disabled Qt3Support
  38. [ link qt3support.cpp /qt//Qt3Support : <qt3support>on ]
  39. [ compile-fail qt3support.cpp /qt//Qt3Support : <qt3support>off ]
  40. # Testing using QtTest. Simple sample
  41. # ToDo: better support for "automoc" aka '#include "qttest.moc"'
  42. [ run qttest.cpp [ cast _ moccable-cpp : qttest.cpp ] /qt//QtTest : : : <define>TEST_MOCK ]
  43. # Test moc rule
  44. [ run mock.cpp mock.h /qt//QtCore : : : <define>TEST_MOCK ]
  45. # Test resource compiler
  46. [ run rcc.cpp rcc.qrc /qt//QtCore : : : <rccflags>"-compress 9 -threshold 10" ]
  47. : # requirements
  48. : # default-build
  49. : # usage-requirements
  50. ;
  51. }
  52. # QtAssistant is removed from Qt >= 4.6
  53. rule check_for_assistant ( properties * )
  54. {
  55. # Extract version number from toolset
  56. local version = [ MATCH "<qt>([0-9.]+).*"
  57. : $(properties) ] ;
  58. if $(version) > "4.6.99"
  59. {
  60. result += <build>no ;
  61. }
  62. }