Changeset c101fe1 for waflib/Tools/qt4.py
- Timestamp:
- Nov 13, 2013, 1:00:56 PM (11 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- d3066e2
- Parents:
- 54e74f0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waflib/Tools/qt4.py
r54e74f0 rc101fe1 21 21 EXT_UI=['.ui'] 22 22 EXT_QT4=['.cpp','.cc','.cxx','.C'] 23 QT4_LIBS="QtCore QtGui QtUiTools QtNetwork QtOpenGL QtSql QtSvg QtTest QtXml QtXmlPatterns QtWebKit Qt3Support QtHelp QtScript QtDeclarative "24 class qxx( cxx.cxx):23 QT4_LIBS="QtCore QtGui QtUiTools QtNetwork QtOpenGL QtSql QtSvg QtTest QtXml QtXmlPatterns QtWebKit Qt3Support QtHelp QtScript QtDeclarative QtDesigner" 24 class qxx(Task.classes['cxx']): 25 25 def __init__(self,*k,**kw): 26 26 Task.Task.__init__(self,*k,**kw) … … 28 28 def scan(self): 29 29 (nodes,names)=c_preproc.scan(self) 30 lst=[] 30 31 for x in nodes: 31 32 if x.name.endswith('.moc'): 32 nodes.remove(x) 33 names.append(x.path_from(self.inputs[0].parent.get_bld())) 34 return(nodes,names) 33 s=x.path_from(self.inputs[0].parent.get_bld()) 34 if s not in names: 35 names.append(s) 36 else: 37 lst.append(x) 38 return(lst,names) 35 39 def runnable_status(self): 36 40 if self.moc_done: … … 42 46 self.add_moc_tasks() 43 47 return Task.Task.runnable_status(self) 48 def create_moc_task(self,h_node,m_node): 49 try: 50 moc_cache=self.generator.bld.moc_cache 51 except AttributeError: 52 moc_cache=self.generator.bld.moc_cache={} 53 try: 54 return moc_cache[h_node] 55 except KeyError: 56 tsk=moc_cache[h_node]=Task.classes['moc'](env=self.env,generator=self.generator) 57 tsk.set_inputs(h_node) 58 tsk.set_outputs(m_node) 59 gen=self.generator.bld.producer 60 gen.outstanding.insert(0,tsk) 61 gen.total+=1 62 return tsk 44 63 def add_moc_tasks(self): 45 64 node=self.inputs[0] … … 91 110 raise Errors.WafError('no header found for %r which is a moc file'%d) 92 111 bld.node_deps[(self.inputs[0].parent.abspath(),m_node.name)]=h_node 93 task=Task.classes['moc'](env=self.env,generator=self.generator) 94 task.set_inputs(h_node) 95 task.set_outputs(m_node) 96 gen=bld.producer 97 gen.outstanding.insert(0,task) 98 gen.total+=1 112 task=self.create_moc_task(h_node,m_node) 99 113 moctasks.append(task) 100 114 tmp_lst=bld.raw_deps[self.uid()]=mocfiles … … 103 117 name=d.name 104 118 if name.endswith('.moc'): 105 task=Task.classes['moc'](env=self.env,generator=self.generator) 106 task.set_inputs(bld.node_deps[(self.inputs[0].parent.abspath(),name)]) 107 task.set_outputs(d) 108 gen=bld.producer 109 gen.outstanding.insert(0,task) 110 gen.total+=1 119 task=self.create_moc_task(bld.node_deps[(self.inputs[0].parent.abspath(),name)],d) 111 120 moctasks.append(task) 112 121 self.run_after.update(set(moctasks)) … … 176 185 else: 177 186 lst.append(flag) 178 self.env ['MOC_FLAGS']=lst187 self.env.append_value('MOC_FLAGS',lst) 179 188 @extension(*EXT_QT4) 180 189 def cxx_hook(self,node): … … 225 234 self.find_qt4_binaries() 226 235 self.set_qt4_libs_to_check() 236 self.set_qt4_defines() 227 237 self.find_qt4_libraries() 228 238 self.add_qt4_rpath() … … 406 416 def add_qt4_rpath(self): 407 417 env=self.env 408 if Options.options.want_rpath:418 if getattr(Options.options,'want_rpath',False): 409 419 def process_rpath(vars_,coreval): 410 420 for d in vars_: … … 430 440 self.qt4_vars_debug=[a+'_debug'for a in self.qt4_vars] 431 441 self.qt4_vars_debug=Utils.to_list(self.qt4_vars_debug) 442 @conf 443 def set_qt4_defines(self): 444 if sys.platform!='win32': 445 return 446 for x in self.qt4_vars: 447 y=x[2:].upper() 448 self.env.append_unique('DEFINES_%s'%x.upper(),'QT_%s_LIB'%y) 449 self.env.append_unique('DEFINES_%s_DEBUG'%x.upper(),'QT_%s_LIB'%y) 432 450 def options(opt): 433 451 opt.add_option('--want-rpath',action='store_true',default=False,dest='want_rpath',help='enable the rpath for qt libraries')
Note: See TracChangeset
for help on using the changeset viewer.