#1276

qt-build-utils: allow QMAKE to be a script

OpenSanderVockeopened 1y ago

qt-build-utils expects QMAKE to point to the qmake binary. However, some Qt installations come with wrappers for qmake.

Example: qt built with vcpkg comes with a qmake.debug.bat in the same folder as qmake.exe, which wraps it to point to the debug build of Qt.

qt-build-utils currently cannot handle passing such a script as QMAKE, because it uses Command::new to execute it - and this only works with binaries, not with scripts.

I suppose to invoke cmd on the passed QMAKE instead, so that this use-case works. If you agree, I would be happy to provide a pull request.

An alternative solution would be to add another env var, QTCONF, which points to the qt conf file for qmake to use.

Activity

4
LeonMatthesKDAB1y ago

Hm, I didn't know it only works with binaries 🤔

Using cmd could be a reasonable approach (even the std docs use suggest this). I'm unsure how this interacts with the actual arguments we provide to qmake. But if you're confident you can work it out I'm happy to accept a PR.

SanderVocke1y ago

Created #1284. I do need to test some more configurations.

LeonMatthesKDAB1y ago

Alright, until you're confident that it works as intended, please convert the PR to a draft so we know when we need to review, thank you :)

SanderVocke1y ago

It is ready for review now, thanks!