diff options
author | Aaron Small <a.small@unb.ca> | 2017-03-26 23:05:03 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-03-27 21:59:28 +0300 |
commit | b5e30fd8e09182473f31d7865d6b8dc5823788cd (patch) | |
tree | 064c67c3a2147f726fd4eccc9013d5870e049120 /mesonbuild/dependencies.py | |
parent | ff4b32741acb36e8b2cf3d83fe0d513ad5753e59 (diff) | |
download | meson-b5e30fd8e09182473f31d7865d6b8dc5823788cd.zip meson-b5e30fd8e09182473f31d7865d6b8dc5823788cd.tar.gz meson-b5e30fd8e09182473f31d7865d6b8dc5823788cd.tar.bz2 |
Fix qt4 tool location detection, which may result in incorrectly picking
up qt5 tools when using the qt4 module.
Diffstat (limited to 'mesonbuild/dependencies.py')
-rw-r--r-- | mesonbuild/dependencies.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index 6fff39b..eacb15b 100644 --- a/mesonbuild/dependencies.py +++ b/mesonbuild/dependencies.py @@ -1010,7 +1010,7 @@ class QtBaseDependency(Dependency): corekwargs = {'required': 'false', 'silent': 'true'} core = PkgConfigDependency(self.qtpkgname + 'Core', env, corekwargs) # Used by self.compilers_detect() - self.bindir = core.get_pkgconfig_variable('host_bins') + self.bindir = self.get_pkgconfig_host_bins(core) if not self.bindir: # If exec_prefix is not defined, the pkg-config file is broken prefix = core.get_pkgconfig_variable('exec_prefix') @@ -1119,10 +1119,25 @@ class Qt5Dependency(QtBaseDependency): def __init__(self, env, kwargs): QtBaseDependency.__init__(self, 'qt5', env, kwargs) + def get_pkgconfig_host_bins(self, core): + return core.get_pkgconfig_variable('host_bins') + class Qt4Dependency(QtBaseDependency): def __init__(self, env, kwargs): QtBaseDependency.__init__(self, 'qt4', env, kwargs) + def get_pkgconfig_host_bins(self, core): + # Only return one bins dir, because the tools are generally all in one + # directory for Qt4, in Qt5, they must all be in one directory. Return + # the first one found among the bin variables, in case one tool is not + # configured to be built. + applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease'] + for application in applications: + try: + return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application)) + except MesonException: + pass + class GnuStepDependency(Dependency): def __init__(self, environment, kwargs): Dependency.__init__(self, 'gnustep') |