aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/qt.py
AgeCommit message (Collapse)AuthorFilesLines
2022-04-12qt dependency: adapt to the qmake command changed nameEli Schwartz1-1/+1
Qt now has official guidance for the symlinked names of the tools, which is great. Qt now officially calls the tools `fooX` instead of `foo-qtX` where the major version of Qt is X. Which is not great, because a bit of an unofficial standard had prior art and now needs to change, and we never adapted. Prefer the official name whenever looking up qmake, and in the testsuite, specifically look only for the official name on versions of qt which we know should have that.
2022-04-12qt dependency: find the correct -qtX configtool nameEli Schwartz1-1/+2
Fixes regression in commit c211fea51389728783cf59ae41156a5e0de9c41a. The original dependency lookup looked for `qmake-{self.name}`, i.e. `qmake-qt5`, but when porting to config-tool, it got switched to `qmake-{self.qtname}` i.e. `qmake-Qt6`, which was bogus and never worked. As a result, if `qmake-qt5` and `qmake` both existed, and the latter was NOT qt5, it would only try the less preferred name, and then fail. We need to define self.name early enough to define the configtool names, which means we need to set it before running the configtool __init__() even though configtool/pkgconfig would also set it to the same value. Mark the tests as passing on two distros that were failing to detect qmake due to this issue, and were marked for skipping because we assumed that the CI skipping there was an expected case rather than an old regression.
2022-04-12Add support for Qt 6.1+John Lindgren1-0/+9
Qt 6.1 moved the location of some binaries from QT_HOST_BINS to QT_HOST_LIBEXECS as noted in the changelog: c515ee178f Move build tools to libexec instead of the bin dir - Tools that are called by the build system and are unlikely to be called by the user are now installed to the libexec directory. https://code.qt.io/cgit/qt/qtreleasenotes.git/tree/qt/6.1.0/release-note.txt It's possible to help the 'qt' module find the tools by adding Qt's libexec directory to the PATH environment variable, but this manual workaround is not ideal. To compensate, meson now needs to look for moc, rcc, uic, etc. in QT_HOST_LIBEXECS as well as QT_HOST_BINS. Co-authored-by: Stefan Hajnoczi <stefanha@jammr.net>
2022-03-07treewide: string-quote the first argument to T.castEli Schwartz1-2/+2
Using future annotations, type annotations become strings at runtime and don't impact performance. This is not possible to do with T.cast though, because it is a function argument instead of an annotation. Quote the type argument everywhere in order to have the same effect as future annotations. This also allows linters to better detect in some cases that a given import is typing-only.
2022-01-18dependencies: don't pass kwargs from get_pkgconfig_variableDylan Baker1-6/+6
This is a layering violation, we're relying on the way the interpreter handles keyword arguments. Instead, pass them as free variables, destructuring in the interpreter
2021-11-01various manual conversion of percent-formatted strings to f-stringsEli Schwartz1-1/+1
2021-10-10Fix typos discovered by codespellChristian Clauss1-3/+3
2021-06-03deps: Split dependencies.baseDaniel Mensinger1-5/+5
Split the Factory and dependency classes out of the base.py script to improve maintainability.
2021-03-23Refactor Qt Dependency into proper split classes with factoriesDylan Baker1-140/+157
Currently the Qt Dependencies still use the old "combined" method for dependencies with multiple ways to be found. This is problematic as it means that `get_variable()` and friends don't work, as the dependency can't implement any of those methods. The correct solution is to make use of multiple Dependency instances, and a factory to tie them together. This does that. To handle QMake, I've leveraged the existing config-tool mechanism, which allows us to save a good deal of code, and use well tested code instead of rolling more of our own code. The one thing this doesn't do, but we probably should, is expose the macOS ExtraFrameworks directly, instead of forcing them to be found through QMake. That is a problem for another series, and someone who cares more about macOS than I do.
2021-03-22qt: move compilers_detect to the qt moduleDylan Baker1-53/+1
It's a method on the QtDependeny that exists purely for the consumption of the qt module (in the form, return some stuff the module makes into an instance variable). So put it where it actually belongs, and pass the qt dependency into it.
2021-03-22dependencies/qt: Split _get_modules_lib_suffix out of the classDylan Baker1-29/+32
As we break these classes up we're going to need this.
2021-03-22dependencies/qt: split get_qmake_host_bins into a free functionDylan Baker1-10/+11
It's static anyway, and never overwritten.
2021-03-22dependencies/qt: Add type annotationsDylan Baker1-50/+71
And fix some style and correctness issues
2021-03-22dependencies: split qt out of the ui moduleDylan Baker1-0/+448
It's a big enough and complicated enough bit of code that it deserves its own module.