forked from qt-creator/qt-creator
qbs build: Prefer KSyntaxHighlighting from system
Note that the system package will only be found with qbs >= 1.20. Change-Id: I361b774d6b35fdbd0386144d4e9812f02f7841e5 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -68,6 +68,8 @@ Module {
|
|||||||
property bool enableUbSanitizer: false
|
property bool enableUbSanitizer: false
|
||||||
property bool enableThreadSanitizer: false
|
property bool enableThreadSanitizer: false
|
||||||
|
|
||||||
|
property bool preferSystemSyntaxHighlighting: true
|
||||||
|
|
||||||
property bool make_dev_package: false
|
property bool make_dev_package: false
|
||||||
|
|
||||||
// Will be replaced when creating modules from products
|
// Will be replaced when creating modules from products
|
||||||
|
@@ -4,9 +4,27 @@ import qbs.FileInfo
|
|||||||
import qbs.Environment
|
import qbs.Environment
|
||||||
|
|
||||||
Project {
|
Project {
|
||||||
QtcLibrary {
|
Product {
|
||||||
name: "KSyntaxHighlighting"
|
name: "KSyntaxHighlighting"
|
||||||
|
|
||||||
|
Export {
|
||||||
|
Depends { name: "qtc" }
|
||||||
|
Depends {
|
||||||
|
name: "Qt.KSyntaxHighlighting"
|
||||||
|
condition: qtc.preferSystemSyntaxHighlighting
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
Depends {
|
||||||
|
name: "KSyntaxHighlighting_bundled"
|
||||||
|
required: !qtc.preferSystemSyntaxHighlighting
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QtcLibrary {
|
||||||
|
name: "KSyntaxHighlighting_bundled"
|
||||||
|
condition: !qtc.preferSystemSyntaxHighlighting || !Qt.KSyntaxHighlighting.present
|
||||||
|
|
||||||
cpp.defines: base.concat("KSYNTAXHIGHLIGHTING_LIBRARY")
|
cpp.defines: base.concat("KSYNTAXHIGHLIGHTING_LIBRARY")
|
||||||
cpp.includePaths: [
|
cpp.includePaths: [
|
||||||
product.sourceDirectory + "/src/lib/",
|
product.sourceDirectory + "/src/lib/",
|
||||||
@@ -16,6 +34,11 @@ Project {
|
|||||||
|
|
||||||
Depends { name: "Qt.gui" }
|
Depends { name: "Qt.gui" }
|
||||||
Depends { name: "Qt.network" }
|
Depends { name: "Qt.network" }
|
||||||
|
Depends {
|
||||||
|
name: "Qt.KSyntaxHighlighting"
|
||||||
|
condition: qtc.preferSystemSyntaxHighlighting
|
||||||
|
required: false
|
||||||
|
}
|
||||||
|
|
||||||
Group {
|
Group {
|
||||||
name: "lib"
|
name: "lib"
|
||||||
|
Reference in New Issue
Block a user