aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/ui.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-12-18 11:03:56 -0800
committerJussi Pakkanen <jpakkane@gmail.com>2018-12-19 23:15:10 +0200
commitd3e638fcbddce4a13d75a25101766f40d8a82b9f (patch)
treee5b8472771717de308530c5660cb3e6a1489409d /mesonbuild/dependencies/ui.py
parentbd630fbe556ffabe572003bc0120870b34e5c053 (diff)
downloadmeson-d3e638fcbddce4a13d75a25101766f40d8a82b9f.zip
meson-d3e638fcbddce4a13d75a25101766f40d8a82b9f.tar.gz
meson-d3e638fcbddce4a13d75a25101766f40d8a82b9f.tar.bz2
dependencies/ui: Fix Qt pkg-config detection on MacOS
Since 0.46.1 pkg-config detection has been broken using the qt from homebrew, due to a bug in homebrew (I think). Tested with qt 5.12.0 on Mojave.
Diffstat (limited to 'mesonbuild/dependencies/ui.py')
-rw-r--r--mesonbuild/dependencies/ui.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
index 1f65c3b..326c72e 100644
--- a/mesonbuild/dependencies/ui.py
+++ b/mesonbuild/dependencies/ui.py
@@ -288,7 +288,15 @@ class QtBaseDependency(ExternalDependency):
self.compile_args += m.get_compile_args()
if self.private_headers:
qt_inc_dir = m.get_pkgconfig_variable('includedir', dict())
- mod_private_inc = _qt_get_private_includes(os.path.join(qt_inc_dir, 'Qt' + m_name), m_name, m.version)
+ mod_private_dir = os.path.join(qt_inc_dir, 'Qt' + m_name)
+ if not os.path.isdir(mod_private_dir):
+ # At least some versions of homebrew don't seem to set this
+ # up correctly. /usr/local/opt/qt/include/Qt + m_name is a
+ # symlink to /usr/local/opt/qt/include, but the pkg-config
+ # file points to /usr/local/Cellar/qt/x.y.z/Headers/, and
+ # the Qt + m_name there is not a symlink, it's a file
+ mod_private_dir = qt_inc_dir
+ mod_private_inc = _qt_get_private_includes(mod_private_dir, m_name, m.version)
for dir in mod_private_inc:
self.compile_args.append('-I' + dir)
self.link_args += m.get_link_args()