diff options
author | metalstrolch <stefan.wildemann@metalstrolche.de> | 2021-12-17 11:10:18 +0100 |
---|---|---|
committer | metalstrolch <stefan.wildemann@metalstrolche.de> | 2021-12-17 11:10:18 +0100 |
commit | 4f59b0f7df7573f02dd18334ddb5569158d6f9eb (patch) | |
tree | de8c1f62e2aa8c8ee9ce466855049e4cca1bf44f | |
parent | ed26d58ddcf7d48352cdd9f673f3e9096df0c905 (diff) | |
download | navit-qt5_no_qml_fix.tar.gz |
Fix:graphics_qt5: allow building without qml againqt5_no_qml_fix
-rwxr-xr-x | CMakeLists.txt | 6 | ||||
-rw-r--r-- | navit/graphics/qt5/graphics_qt5.cpp | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 947ee1410..3f6e98403 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -386,9 +386,11 @@ if (Qt5Widgets_FOUND OR Qt5Quick_FOUND) set_with_reason(USE_QML "Qt5Quick found" TRUE) if(USE_QML) set(Qt5_ADDITIONAL_LIBRARIES ${Qt5_ADDITIONAL_LIBRARIES} ${Qt5Quick_LIBRARIES}) + set_with_reason(gui/qt5_qml "Qt5 found" TRUE + ${Qt5Quick_LIBRARIES}) + else() + set_with_reason(gui/qt5_qml "feature USE_QML disabled for graphics/qt5" FALSE) endif() - set_with_reason(gui/qt5_qml "Qt5 found" TRUE - ${Qt5Quick_LIBRARIES}) endif() set_with_reason(graphics/qt5 "Qt5 found" TRUE diff --git a/navit/graphics/qt5/graphics_qt5.cpp b/navit/graphics/qt5/graphics_qt5.cpp index e2747ff78..7d157935e 100644 --- a/navit/graphics/qt5/graphics_qt5.cpp +++ b/navit/graphics/qt5/graphics_qt5.cpp @@ -753,10 +753,12 @@ static void* get_data(struct graphics_priv* this_priv, char const* type) { resize_callback(this_priv, this_priv->pixmap->width(), this_priv->pixmap->height()); return win; } +#if USE_QML if (strcmp(type, "engine") == 0) { dbg(lvl_debug, "Hand over QQmlApplicationEngine"); return (this_priv->engine); } +#endif return NULL; } |