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