diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-18 12:53:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-18 12:53:50 +0200 |
commit | 67c106a00152b44409a36ce7295a232afd09941c (patch) | |
tree | da480945e92c0f4d15d74924e72f034f663c2b16 /mesonbuild/modules/qt4.py | |
parent | e918497c786b2c339a8cdd3e294515d984cd8e8c (diff) | |
parent | eaafca6f4af11290331cbc4788688407c0fb654f (diff) | |
download | meson-67c106a00152b44409a36ce7295a232afd09941c.zip meson-67c106a00152b44409a36ce7295a232afd09941c.tar.gz meson-67c106a00152b44409a36ce7295a232afd09941c.tar.bz2 |
Merge pull request #1210 from centricular/qt-fixes-windows
Various Qt and pkg-config fixes for windows
Diffstat (limited to 'mesonbuild/modules/qt4.py')
-rw-r--r-- | mesonbuild/modules/qt4.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mesonbuild/modules/qt4.py b/mesonbuild/modules/qt4.py index 63dfef8..2d89792 100644 --- a/mesonbuild/modules/qt4.py +++ b/mesonbuild/modules/qt4.py @@ -107,10 +107,10 @@ class Qt4Module(): 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 qt4 installation" @@ -122,8 +122,11 @@ class Qt4Module(): qrc_deps = [] for i in rcc_files: qrc_deps += self.parse_qrc(state, i) - basename = os.path.split(rcc_files[0])[1] - name = 'qt4-' + basename.replace('.', '_') + if len(args) > 0: + name = args[0] + else: + basename = os.path.split(rcc_files[0])[1] + name = 'qt4-' + basename.replace('.', '_') rcc_kwargs = {'input' : rcc_files, 'output' : name + '.cpp', 'command' : [self.rcc, '-o', '@OUTPUT@', '@INPUT@'], |