-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CXX-Qt does not work in split-Qt installations #1153
Comments
Hmm, I wonder how CMake is finding things in this case? And ideally it would be nice if a cargo-only build can continue to only depend on Qt/qmake and not CMake existing 🤔 But I wonder if this continues being an up hill battle, something to think about in the build system refactor. |
Because CMake modules work completely different. The modules themselves can declare where their include headers live (usually under the targets file. See
It doesn't necessarily have to depend on CMake being available, we could have it as an optional thing. In most scenarios, qmake works fine. We just have a special case in KDE :) And as I suggested earlier, I hacked in cmake-package-rs support and got it to build farther. |
Hm, as we abstract this via qt_build_utils, in principle it's okay with supporting both CMake and QMake "backend" essentially. |
This is needed for scenarios where the CMake packaging for Qt is better than what QMake can handle, e.g. split Qt installations where the modules live in different directories. A new optional feature is added to cxx-qt-build to prefer CMake for most operations related to linking/including Qt modules. QMake is still the default. Fixes KDAB#1153.
Which I have started in #1156 :) |
This is needed for scenarios where the CMake packaging for Qt is better than what QMake can handle, e.g. split Qt installations where the modules live in different directories. A new optional feature is added to cxx-qt-build to prefer CMake for most operations related to linking/including Qt modules. QMake is still the default. Fixes KDAB#1153.
This is needed for scenarios where the CMake packaging for Qt is better than what QMake can handle, e.g. split Qt installations where the modules live in different directories. A new optional feature is added to cxx-qt-build to prefer CMake for most operations related to linking/including Qt modules. QMake is still the default. Fixes KDAB#1153.
This is needed for scenarios where the CMake packaging for Qt is better than what QMake can handle, e.g. split Qt installations where the modules live in different directories. A new optional feature is added to cxx-qt-build to prefer CMake for most operations related to linking/including Qt modules. QMake is still the default. Fixes KDAB#1153.
This is needed for scenarios where the CMake packaging for Qt is better than what QMake can handle, e.g. split Qt installations where the modules live in different directories. A new optional feature is added to cxx-qt-build to prefer CMake for most operations related to linking/including Qt modules. QMake is still the default. Fixes KDAB#1153.
I was working on integrating Rust and a CXX-Qt application into KDE's Craft build/package system, specifically for building an Android application. I managed to get somewhat far, but I'm now hitting a brick wall. This is half-question, half-notes to myself.
Selected qmake binary
I needed to set
QMAKE
manually, which we do have in the documentation which is extremely helpful. However, it's weird that the qmake you find in CMake (through theQt::qmake
target) can be completely different than what cxx-qt uses by default. In Craft, we have twoqmake
binaries: one for the host (x86_64) and one belonging to the actual Qt installation used for cross-compilation.The
Qt::qmake
targets points to the correct qmake to use, but cxx-qt picks the host's version which is very wrong and ends up pointing the wrong Qt.The Qt installation is split
In Craft, we split Qt into separate packages that are installed separately. This is the same split as in git, so
qtbase
containsQtCore
and it's sister modules andqtdeclarative
containsQtQml
,QtQuickControls2
, and so on. You can start to see where the problem is.In cxx-qt, we use
qmake
to query where the headers are with theQT_INSTALL_HEADERS
qmake built-in. Except that this only has one path(?), which is the one from qtbase. This means that it's currently impossible to build cxx-qt out of the box, as far as I'm aware.(cxx-qt-build only includes
/home/user/CraftRoot/build/libs/qt6/qtbase/image-MinSizeRel-6.8.0/include
, so stuff likeQQmlApplication
can't build out of the box.)In cxx-kde-frameworks, we have started using cmake-package-rs to use the existing CMake modules from KDE Frameworks, I wonder if that'll work here too? That way we can depend less on qmake too.
The text was updated successfully, but these errors were encountered: