forked from qt-creator/qt-creator
qbs build: Make ImageViewer build with Qt 6
Change-Id: If934d2df162e043102ba65d9c3de4fb7fc121540 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -17,6 +17,7 @@ Product {
|
|||||||
FileInfo.relativePath(FileInfo.joinPaths('/', qtc.ide_qbs_imports_path),
|
FileInfo.relativePath(FileInfo.joinPaths('/', qtc.ide_qbs_imports_path),
|
||||||
FileInfo.joinPaths('/', qtc.ide_shared_sources_path)))
|
FileInfo.joinPaths('/', qtc.ide_shared_sources_path)))
|
||||||
property bool sanitizable: true
|
property bool sanitizable: true
|
||||||
|
property bool usesQt6: Utilities.versionCompare(Qt.core.version, "6") >= 0
|
||||||
|
|
||||||
Depends { name: "cpp" }
|
Depends { name: "cpp" }
|
||||||
Depends { name: "qtc" }
|
Depends { name: "qtc" }
|
||||||
@@ -31,7 +32,7 @@ Product {
|
|||||||
Depends { name: "Qt.core"; versionAtLeast: "5.14.0" }
|
Depends { name: "Qt.core"; versionAtLeast: "5.14.0" }
|
||||||
Depends {
|
Depends {
|
||||||
name: "Qt.core5compat"
|
name: "Qt.core5compat"
|
||||||
condition: Utilities.versionCompare(Qt.core.version, "6") >= 0
|
condition: usesQt6
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Should fall back to what came from Qt.core for Qt < 5.7, but we cannot express that
|
// TODO: Should fall back to what came from Qt.core for Qt < 5.7, but we cannot express that
|
||||||
|
@@ -1,16 +1,15 @@
|
|||||||
import qbs 1.0
|
|
||||||
|
|
||||||
QtcPlugin {
|
QtcPlugin {
|
||||||
name: "ImageViewer"
|
name: "ImageViewer"
|
||||||
|
|
||||||
Depends { name: "Qt.svg"; required: false }
|
Depends { name: "Qt.svg"; required: false }
|
||||||
|
Depends { name: "Qt.svgwidgets"; condition: usesQt6; required: false }
|
||||||
Depends { name: "Qt.widgets" }
|
Depends { name: "Qt.widgets" }
|
||||||
Depends { name: "Utils" }
|
Depends { name: "Utils" }
|
||||||
|
|
||||||
Depends { name: "Core" }
|
Depends { name: "Core" }
|
||||||
|
|
||||||
Properties {
|
Properties {
|
||||||
condition: !Qt.svg.present
|
condition: !Qt.svg.present || (usesQt6 && !Qt.svgwidgets.present)
|
||||||
cpp.defines: base.concat("QT_NO_SVG")
|
cpp.defines: base.concat("QT_NO_SVG")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,8 +19,6 @@ QtcTool {
|
|||||||
property bool useQuick3d: Utilities.versionCompare(Qt.core.version, "5.15") >= 0
|
property bool useQuick3d: Utilities.versionCompare(Qt.core.version, "5.15") >= 0
|
||||||
&& Qt["quick3d-private"].present
|
&& Qt["quick3d-private"].present
|
||||||
|
|
||||||
property bool useQt5Compat: Utilities.versionCompare(Qt.core.version, "6.0") >= 0
|
|
||||||
|
|
||||||
cpp.defines: {
|
cpp.defines: {
|
||||||
var defines = base.filter(function(d) { return d != "QT_CREATOR"; });
|
var defines = base.filter(function(d) { return d != "QT_CREATOR"; });
|
||||||
if (useQuick3d)
|
if (useQuick3d)
|
||||||
@@ -265,13 +263,13 @@ QtcTool {
|
|||||||
|
|
||||||
Group {
|
Group {
|
||||||
name: "puppet2 Qt 5 compatibility sources"
|
name: "puppet2 Qt 5 compatibility sources"
|
||||||
condition: product.useQt5Compat
|
condition: product.usesQt6
|
||||||
files: ["editor3d/qt5compat/qquick3darealight.cpp"]
|
files: ["editor3d/qt5compat/qquick3darealight.cpp"]
|
||||||
}
|
}
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
name: "puppet2 Qt 5 compatibility headers"
|
name: "puppet2 Qt 5 compatibility headers"
|
||||||
condition: product.useQt5Compat
|
condition: product.usesQt6
|
||||||
files: ["editor3d/qt5compat/qquick3darealight_p.h"]
|
files: ["editor3d/qt5compat/qquick3darealight_p.h"]
|
||||||
fileTags: product.useQuick3d ? [] : ["unmocable"]
|
fileTags: product.useQuick3d ? [] : ["unmocable"]
|
||||||
overrideTags: false
|
overrideTags: false
|
||||||
|
Reference in New Issue
Block a user