|
|
|
@ -113,10 +113,10 @@ class Qt5Module(): |
|
|
|
|
moc_sources = kwargs.pop('moc_sources', []) |
|
|
|
|
if not isinstance(moc_sources, list): |
|
|
|
|
moc_sources = [moc_sources] |
|
|
|
|
srctmp = kwargs.pop('sources', []) |
|
|
|
|
if not isinstance(srctmp, list): |
|
|
|
|
srctmp = [srctmp] |
|
|
|
|
sources = args[1:] + srctmp |
|
|
|
|
sources = kwargs.pop('sources', []) |
|
|
|
|
if not isinstance(sources, list): |
|
|
|
|
sources = [sources] |
|
|
|
|
sources += args[1:] |
|
|
|
|
self._detect_tools(state.environment) |
|
|
|
|
err_msg = "{0} sources specified and couldn't find {1}, " \ |
|
|
|
|
"please check your qt5 installation" |
|
|
|
@ -128,13 +128,16 @@ class Qt5Module(): |
|
|
|
|
qrc_deps = [] |
|
|
|
|
for i in rcc_files: |
|
|
|
|
qrc_deps += self.parse_qrc(state, i) |
|
|
|
|
basename = os.path.split(rcc_files[0])[1] |
|
|
|
|
if len(args) > 0: |
|
|
|
|
name = args[0] |
|
|
|
|
else: |
|
|
|
|
basename = os.path.split(rcc_files[0])[1] |
|
|
|
|
name = 'qt5-' + basename.replace('.', '_') |
|
|
|
|
rcc_kwargs = {'input' : rcc_files, |
|
|
|
|
'output' : basename + '.cpp', |
|
|
|
|
'output' : name + '.cpp', |
|
|
|
|
'command' : [self.rcc, '-o', '@OUTPUT@', '@INPUT@'], |
|
|
|
|
'depend_files' : qrc_deps, |
|
|
|
|
} |
|
|
|
|
name = 'qt5-' + basename.replace('.', '_') |
|
|
|
|
res_target = build.CustomTarget(name, state.subdir, rcc_kwargs) |
|
|
|
|
sources.append(res_target) |
|
|
|
|
if len(ui_files) > 0: |
|
|
|
|