diff options
-rw-r--r-- | mesonbuild/dependencies/ui.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py index 11d6e88..31f02e5 100644 --- a/mesonbuild/dependencies/ui.py +++ b/mesonbuild/dependencies/ui.py @@ -363,7 +363,12 @@ class QtBaseDependency(ExternalDependency): if self.env.machines.host.is_darwin() and not any(s in xspec for s in ['ios', 'tvos']): mlog.debug("Building for macOS, looking for framework") self._framework_detect(qvars, mods, kwargs) - return self.qmake.name + # Sometimes Qt is built not as a framework (for instance, when using conan pkg manager) + # skip and fall back to normal procedure then + if self.is_found: + return self.qmake.name + else: + mlog.debug("Building for macOS, couldn't find framework, falling back to library search") incdir = qvars['QT_INSTALL_HEADERS'] self.compile_args.append('-I' + incdir) libdir = qvars['QT_INSTALL_LIBS'] @@ -413,6 +418,9 @@ class QtBaseDependency(ExternalDependency): suffix += 'd' if self.qtver == '4': suffix += '4' + if self.env.machines[self.for_machine].is_darwin(): + if is_debug: + suffix += '_debug' return suffix def _link_with_qtmain(self, is_debug, libdir): @@ -435,8 +443,8 @@ class QtBaseDependency(ExternalDependency): fname = 'Qt' + m mlog.debug('Looking for qt framework ' + fname) fwdep = QtExtraFrameworkDependency(fname, self.env, fw_kwargs, language=self.language) - self.compile_args.append('-F' + libdir) if fwdep.found(): + self.compile_args.append('-F' + libdir) self.compile_args += fwdep.get_compile_args(with_private_headers=self.private_headers, qt_version=self.version) self.link_args += fwdep.get_link_args() @@ -444,8 +452,8 @@ class QtBaseDependency(ExternalDependency): break else: self.is_found = True - # Used by self.compilers_detect() - self.bindir = self.get_qmake_host_bins(qvars) + # Used by self.compilers_detect() + self.bindir = self.get_qmake_host_bins(qvars) def get_qmake_host_bins(self, qvars): # Prefer QT_HOST_BINS (qt5, correct for cross and native compiling) |