aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/syntax-highlighting/syntax-highlighting.qbs
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2021-05-11 11:38:27 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2021-05-11 14:30:18 +0000
commitda8b3f237a17d463919ef9e0586656747e54f359 (patch)
tree10638f38770d12b4e2b787294cce3e8ce7413b83 /src/libs/3rdparty/syntax-highlighting/syntax-highlighting.qbs
parent1ea3d707c68b4571d48a6c980353efc33a3cd11d (diff)
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>
Diffstat (limited to 'src/libs/3rdparty/syntax-highlighting/syntax-highlighting.qbs')
-rw-r--r--src/libs/3rdparty/syntax-highlighting/syntax-highlighting.qbs25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/libs/3rdparty/syntax-highlighting/syntax-highlighting.qbs b/src/libs/3rdparty/syntax-highlighting/syntax-highlighting.qbs
index 2261d97d69..e3c7682e3f 100644
--- a/src/libs/3rdparty/syntax-highlighting/syntax-highlighting.qbs
+++ b/src/libs/3rdparty/syntax-highlighting/syntax-highlighting.qbs
@@ -4,9 +4,27 @@ import qbs.FileInfo
import qbs.Environment
Project {
- QtcLibrary {
+ Product {
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.includePaths: [
product.sourceDirectory + "/src/lib/",
@@ -16,6 +34,11 @@ Project {
Depends { name: "Qt.gui" }
Depends { name: "Qt.network" }
+ Depends {
+ name: "Qt.KSyntaxHighlighting"
+ condition: qtc.preferSystemSyntaxHighlighting
+ required: false
+ }
Group {
name: "lib"