diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-02-21 18:30:42 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-03-04 22:28:46 +0000 |
commit | 0eade4f3c6eb6d47c546152b40302ea7b59660a0 (patch) | |
tree | ced30894b1cf245cbbc2a864cf07f74251c1691c | |
parent | 7e52ba05ad6b24e9891baaca20d6f41b5fbae286 (diff) | |
download | meson-0eade4f3c6eb6d47c546152b40302ea7b59660a0.zip meson-0eade4f3c6eb6d47c546152b40302ea7b59660a0.tar.gz meson-0eade4f3c6eb6d47c546152b40302ea7b59660a0.tar.bz2 |
Fix dependency('qt4|5', method: 'qmake') for Cygwin
Fix dependency('qt4|5', method: 'qmake') detection when shared library
extension isn't .so
Note that OSX already has a special case to look for .framework
-rw-r--r-- | mesonbuild/dependencies/ui.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index a84decf..bc3eafc 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -23,7 +23,7 @@ from collections import OrderedDict from .. import mlog from .. import mesonlib from ..mesonlib import ( - MesonException, Popen_safe, extract_as_list, for_windows, + MesonException, Popen_safe, extract_as_list, for_windows, for_cygwin, version_compare_many ) from ..environment import detect_cpu @@ -285,6 +285,10 @@ class QtBaseDependency(ExternalDependency): incdir = qvars['QT_INSTALL_HEADERS'] self.compile_args.append('-I' + incdir) libdir = qvars['QT_INSTALL_LIBS'] + if for_cygwin(self.env.is_cross_build(), self.env): + shlibext = '.dll.a' + else: + shlibext = '.so' # Used by self.compilers_detect() self.bindir = self.get_qmake_host_bins(qvars) self.is_found = True @@ -306,7 +310,7 @@ class QtBaseDependency(ExternalDependency): self.is_found = False break else: - libfile = os.path.join(libdir, 'lib{}{}.so'.format(self.qtpkgname, module)) + libfile = os.path.join(libdir, 'lib{}{}{}'.format(self.qtpkgname, module, shlibext)) if not os.path.isfile(libfile): self.is_found = False break |