aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/qt5.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-11-08 23:45:31 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-11-11 01:51:02 +0530
commit3fe5fcd7f7ca7a6ba4d9b6235bf74304aeaa8d3d (patch)
treee57092427f6ec441de87a4a72785a4e0d0a63ed1 /mesonbuild/modules/qt5.py
parente02aaad63286169aebf63109363fed648a185b05 (diff)
downloadmeson-3fe5fcd7f7ca7a6ba4d9b6235bf74304aeaa8d3d.zip
meson-3fe5fcd7f7ca7a6ba4d9b6235bf74304aeaa8d3d.tar.gz
meson-3fe5fcd7f7ca7a6ba4d9b6235bf74304aeaa8d3d.tar.bz2
qt4/qt5: Print a message when moc/uic/rcc aren't found
Without this a strange exception is spewed that no one would be able to understand. Finding each of those compilers isn't a problem unless sources are specified that require those compilers, so only error out in those cases. Closes #758
Diffstat (limited to 'mesonbuild/modules/qt5.py')
-rw-r--r--mesonbuild/modules/qt5.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mesonbuild/modules/qt5.py b/mesonbuild/modules/qt5.py
index 9fffcff..01e9df1 100644
--- a/mesonbuild/modules/qt5.py
+++ b/mesonbuild/modules/qt5.py
@@ -122,7 +122,13 @@ class Qt5Module():
if not isinstance(srctmp, list):
srctmp = [srctmp]
sources = args[1:] + srctmp
+ err_msg = "{0} sources specified and couldn't find {1}, " \
+ "please check your qt5 installation"
+ if len(moc_headers) + len(moc_sources) > 0 and not self.moc.found():
+ raise MesonException(err_msg.format('MOC', 'moc-qt5'))
if len(rcc_files) > 0:
+ if not self.rcc.found():
+ raise MesonException(err_msg.format('RCC', 'rcc-qt5'))
qrc_deps = []
for i in rcc_files:
qrc_deps += self.parse_qrc(state, i)
@@ -137,6 +143,8 @@ class Qt5Module():
rcc_kwargs)
sources.append(res_target)
if len(ui_files) > 0:
+ if not self.uic.found():
+ raise MesonException(err_msg.format('UIC', 'uic-qt5'))
ui_kwargs = {'output' : 'ui_@BASENAME@.h',
'arguments' : ['-o', '@OUTPUT@', '@INPUT@']}
ui_gen = build.Generator([self.uic], ui_kwargs)