diff options
authorMitch Curtis <mitch.curtis@qt.io>2018-10-26 15:50:55 +0200
committerMitch Curtis <mitch.curtis@qt.io>2018-10-26 14:11:26 +0000
commit8c9c1b41e1403bcd69a4de4c1807da12ee3d7329 (patch)
parente46b1f09fca2af0782648d14cac401ec62ac46b4 (diff)
Doc: add section on dynamic and statically-built Qt projects
It's currently not documented how to have a library that can be both dynamically and statically linked to an application. Change-Id: Ic9130ccb7f8b476d6d91231e4eacef2caadcf1d1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/howtos.qdoc b/doc/howtos.qdoc
index afd3c0962..7ef1fc086 100644
--- a/doc/howtos.qdoc
+++ b/doc/howtos.qdoc
@@ -110,6 +110,21 @@
The product definitions would stay exactly the same. In particular, their location
in the project tree is irrelevant to the relationship between them.
+ \section2 Choosing Between Dynamic and Statically-built Qt Projects
+ To build \c "the-lib" as either a dynamic or static library, depending on
+ how Qt was built, you can use the following code:
+ \code
+ Product {
+ name: "the-lib"
+ type: Qt.core.staticBuild ? "staticlibrary" : "dynamiclibrary"
+ Depends { name: "Qt.core" }
+ // ...
+ }
+ \endcode
\section1 How do I use precompiled headers?
If you use a \l Group item to add a precompiled header file to a product