probonopd / linuxdeployqt

Makes Linux applications self-contained by copying in the libraries and plugins that the application uses, and optionally generates an AppImage. Can be used for Qt and other applications
Other
2.22k stars 414 forks source link

replace qmake with cmake? #612

Open aoloe opened 5 months ago

aoloe commented 5 months ago

i'm currently poriting the appimage creation for scribus from qt5 to qt6 and the process was / is not trivial.

one of the issue was that linuxdeployqt calls qmake but with qt6 the executable is qmake6. (i'm now passing the path to qmake as an argument... but i had to find out about it, first...)

i'm still in the process of tweaking AppImage-package/bundle.sh but, when asking for help in the #qt channel, they suggested that for qt6 application it would be better to use cmake instead of qmake:

https://www.qt.io/blog/deploying-to-linux-with-cmake

probonopd commented 5 months ago

You can compile the application using cmake.

qmake/qmake6 is only needed by linuxdeployqt to determine the path to Qt. (Can that path be gotten from cmake? How?)

dfaure-kdab commented 4 months ago

With Qt6 you can use the cmake variable "${QT6_INSTALL_PREFIX}"

Otherwise you can query qmake with Qt5 and qtpaths with Qt6, like this https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/master/modules/ECMQueryQt.cmake

probonopd commented 4 months ago

@aoloe if you run qtpaths on your system, would it give the correct Qt path? Maybe we could use that in linuxdeployqt then.