summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2023-12-14 16:05:17 +0100
committerKai Köhne <kai.koehne@qt.io>2024-01-14 11:02:09 +0100
commit818f5093e90fb9895b77732709184d5aea52d1ab (patch)
tree327e1ccf3775883b18d4582f261df39464cc6af6
parent3d155ab40b12a5af9c82cd9da7b75faeff56fc28 (diff)
Doc: Update section on static linking on Linux
Pick-to: 6.5 6.6 6.7 Change-Id: Ia6b98f83b6757e14b5080ffab15ba9833bd97689 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
-rw-r--r--doc/src/platforms/linux.qdoc19
-rw-r--r--doc/src/snippets/code/doc_src_deployment.qdoc8
2 files changed, 10 insertions, 17 deletions
diff --git a/doc/src/platforms/linux.qdoc b/doc/src/platforms/linux.qdoc
index db71e69f8..129a4a083 100644
--- a/doc/src/platforms/linux.qdoc
+++ b/doc/src/platforms/linux.qdoc
@@ -488,21 +488,12 @@
\section2 Building Qt Statically
- To use this approach, you must start by installing a static version
- of the Qt library:
+ To use this approach, you must start by building a _static_ version
+ of the Qt libraries. Follow the steps in
+ \l{Qt for Linux/X11 - Building from Source}, but remember to add
+ a \c{-static} argument to configure:
- \snippet snippets/code/doc_src_deployment.qdoc 0
-
- We specify the prefix so that we do not overwrite the existing Qt
- installation. The example above only builds the Qt libraries,
- i.e. the examples and Qt Designer will not be built. When \c make
- is done, you will find the Qt libraries in the \c /path/to/Qt/lib
- directory.
-
- When linking your application against static Qt libraries, note
- that you might need to add more libraries to the \c LIBS line in
- your project file. For more information, see the \l {Application
- Dependencies} section.
+ \include snippets/code/doc_src_deployment.qdoc 0
\section2 Linking the Application to the Static Version of Qt
diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc
index 2f5110b5b..f7746cfb9 100644
--- a/doc/src/snippets/code/doc_src_deployment.qdoc
+++ b/doc/src/snippets/code/doc_src_deployment.qdoc
@@ -2,9 +2,11 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//! [0]
-cd /path/to/Qt
-./configure -static -prefix /path/to/Qt <other parameters>
-make
+\badcode \QtVersion
+mkdir -p ~/dev/qt-build
+cd ~/dev/qt-build
+/tmp/qt-everywhere-src-\1/configure -static
+\endcode
//! [0]