wscript 867 B

12345678910111213141516171819202122232425262728293031323334
  1. #! /usr/bin/env python
  2. # encoding: utf-8
  3. # Thomas Nagy, 2016 (ita)
  4. VERSION='0.0.1'
  5. APPNAME='qt5_test'
  6. top = '.'
  7. out = 'build'
  8. def options(opt):
  9. opt.load('compiler_cxx qt5')
  10. def configure(conf):
  11. conf.load('compiler_cxx qt5')
  12. #conf.env.append_value('CXXFLAGS', ['-g']) # test
  13. def build(bld):
  14. # According to the Qt5 documentation:
  15. # Qt classes in foo.h -> declare foo.h as a header to be processed by moc
  16. # add the resulting moc_foo.cpp to the source files
  17. # Qt classes in foo.cpp -> include foo.moc at the end of foo.cpp
  18. #
  19. bld(
  20. features = 'qt5 cxx cxxprogram',
  21. use = 'QT5CORE QT5GUI QT5SVG QT5WIDGETS',
  22. source = 'main.cpp res.qrc but.ui foo.cpp',
  23. moc = 'foo.h',
  24. target = 'window',
  25. includes = '.',
  26. lang = bld.path.ant_glob('linguist/*.ts'),
  27. langname = 'somefile', # include the .qm files from somefile.qrc
  28. )