aboutsummaryrefslogtreecommitdiffstats
path: root/doc/howtos.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/howtos.qdoc')
-rw-r--r--doc/howtos.qdoc30
1 files changed, 16 insertions, 14 deletions
diff --git a/doc/howtos.qdoc b/doc/howtos.qdoc
index e21a2588d..9a81318ee 100644
--- a/doc/howtos.qdoc
+++ b/doc/howtos.qdoc
@@ -25,7 +25,7 @@
**
****************************************************************************/
/*!
- \previouspage custom-modules.html
+ \previouspage tutorial-8.html
\nextpage reference.html
\page howtos.html
@@ -390,19 +390,19 @@
Depends { name: "cpp" }
cpp.includePaths: ["/somewhere/include"]
Properties {
- condition: qbs.targetOS.contains("android")
+ condition: qbs.targetOS.includes("android")
cpp.dynamicLibraries: ["/somewhere/android/" + Android.ndk.abi + "/lib1.so"]
}
Properties {
- condition: qbs.targetOS.contains("macos")
+ condition: qbs.targetOS.includes("macos")
cpp.dynamicLibraries: ["/somewhere/macos/lib1.dylib"]
}
Properties {
- condition: qbs.targetOS.contains("windows") && qbs.architecture === "x86"
+ condition: qbs.targetOS.includes("windows") && qbs.architecture === "x86"
cpp.dynamicLibraries: ["/somewhere/windows_x86/lib1.lib"]
}
Properties {
- condition: qbs.targetOS.contains("windows") && qbs.architecture === "x86_64"
+ condition: qbs.targetOS.includes("windows") && qbs.architecture === "x86_64"
cpp.dynamicLibraries: ["/somewhere/windows_x86_64/lib1.lib"]
}
}
@@ -467,15 +467,17 @@
\section1 How do I build against libraries that provide pkg-config files?
- Just add a \l Depends item that matches the name of the pkg-config module, and \QBS
- will automatically employ \l{https://www.freedesktop.org/wiki/Software/pkg-config}{pkg-config}
+ Just add a \l Depends item that matches the name of the pkg-config module,
+ set the \l Product::qbsModuleProviders property to \c "qbspkgconfig",
+ and \QBS will employ
+ \l{https://www.freedesktop.org/wiki/Software/pkg-config}{pkg-config}
to find the headers and libraries if no matching \QBS module can be found. For instance,
to build against the OpenSSL library, you would write this:
\code
+ qbsModuleProviders: "qbspkgconfig"
Depends { name: "openssl" }
\endcode
- That's it. The pkg-config behavior can be fine-tuned via the \l pkgconfig module,
- but normally you will not need to pull it in explicitly.
+ That's it. The pkg-config behavior can be fine-tuned via the \l qbspkgconfig provider.
Internally, this functionality is implemented via \l {Module Providers}
@@ -532,7 +534,7 @@
CppApplication {
// ...
- readonly property bool isMsvc: qbs.toolchain.contains("msvc")
+ readonly property bool isMsvc: qbs.toolchain.includes("msvc")
cpp.commonCompilerFlags: isMsvc ? "/wd4996" : "-Wno-deprecated-declarations"
}
@@ -755,7 +757,7 @@
\c qbs.targetOS has the wrong value:
\code
- readonly property bool unix: qbs.targetOS.contains("unix")
+ readonly property bool unix: qbs.targetOS.includes("unix")
\endcode
To find out the value of \c qbs.targetOS, use \c {console.info()}:
@@ -763,7 +765,7 @@
\code
readonly property bool unix: {
console.info("qbs.targetOS: " + qbs.targetOS)
- return qbs.targetOS.contains("unix")
+ return qbs.targetOS.includes("unix")
}
\endcode
@@ -771,9 +773,9 @@
be useful if the property contains invalid or unsupported value:
\code
readonly property bool unix: {
- if (qbs.targetOS.contains("darwin"))
+ if (qbs.targetOS.includes("darwin"))
throw "Apple platforms are not supported";
- return qbs.targetOS.contains("unix")
+ return qbs.targetOS.includes("unix")
}
\endcode