aboutsummaryrefslogtreecommitdiffstats
path: root/doc/howtos.qdoc
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-02-23 16:42:37 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2019-01-23 14:35:02 +0000
commitc2833b1a009bc7c382b30d94109b9b7a25a404a6 (patch)
tree5b960940919310f8867e503234ca6d4f4295bfbe /doc/howtos.qdoc
parent1bfc30065371a3d28421e2e7af5653e1e78259f3 (diff)
Introduce module providers
If a dependency is not found, we now search for a matching module provider that can generate one for us. We also provide a generic fall-back provider which uses pkg-config to locate the dependency (but could be extended to incorporate other methods in the future). This is the most important part of this change for practical purposes, as it makes hundreds of popular libraries available for use in qbs projects without users having to write any boilerplate code. In a future patch, a module provider could also be used to implement the functionality of the qtprofilesetup library, relieving users of the need to create a profile for building Qt applications. [ChangeLog] The Depends item now falls back to pkg-config to locate dependencies whose names do not correspond to a qbs module. Fixes: QBS-1107 Change-Id: Ifd4f05c237cf58cd9fe707c3da648d3dbb33e82b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'doc/howtos.qdoc')
-rw-r--r--doc/howtos.qdoc15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/howtos.qdoc b/doc/howtos.qdoc
index 7ef1fc086..a2595cffd 100644
--- a/doc/howtos.qdoc
+++ b/doc/howtos.qdoc
@@ -41,6 +41,7 @@
\li \l{How do I make sure my generated sources are getting compiled?}
\li \l{How do I run my autotests?}
\li \l{How do I create a module for a third-party library?}
+ \li \l{How do I build against libraries that provide pkg-config files?}
\li \l{How do I create application bundles and frameworks on iOS, macOS, tvOS, and watchOS?}
\li \l{How do I apply C/C++ preprocessor macros to only a subset of the files in my product?}
\li \l{How do I make the state of my Git repository available to my source files?}
@@ -315,6 +316,20 @@
static library; see the \l{How do I make my app build against my library?} section for an
example.
+ \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}
+ 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
+ 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.
+
+ Internally, this functionality is implemented via \l {Module Providers}
+
\section1 How do I apply C/C++ preprocessor macros to only a subset of the files in my product?
Use a \l{Group} item to define a subset of project files. To add