aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2020-11-21 14:11:37 +0100
committerIvan Komissarov <ABBAPOH@gmail.com>2020-11-23 13:38:47 +0000
commit2a68e286b2c3342a96b52116a5840fb910a3c4e8 (patch)
tree405ee8e16c401582d6fab83ab1bb6ae7ab598f7e /doc
parent7f1ee5c871699f89e7fdd741fcd1f0b2167a203b (diff)
doc: Add section about building Qbs with CMake
Fixes: QBS-1618 Change-Id: Id70fdb4213fe7877978f4fa62bbb35dfe13adb51 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: Richard Weickelt <richard@weickelt.de> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/qbs.qdoc46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/qbs.qdoc b/doc/qbs.qdoc
index 885ed6a72..217e41e7c 100644
--- a/doc/qbs.qdoc
+++ b/doc/qbs.qdoc
@@ -467,6 +467,52 @@
Regenerating the man page requires the \c help2man tool.
+ \section1 Building \QBS with СMake
+
+ To build \QBS, enter the following commands:
+
+ \code
+ mkdir build && cd build
+ cmake -DQt5_DIR=${QT_DIR}/lib/cmake/Qt5/ ..
+ make
+ \endcode
+
+ Where \c ${QT_DIR} is the directory where Qt is installed. Passing the \c Qt5_DIR option
+ is not necessary if \c qmake is present in \c PATH.
+
+ Depending on your platform, you might use \c mingw32-make, \c nmake, or
+ \c jom instead of \c make.
+
+ Alternatively, you can use the
+ \l{https://cmake.org/cmake/help/latest/generator/Ninja.html}{Ninja} generator:
+ \code
+ cmake -GNinja -DQt5_DIR=${QT_DIR}/lib/cmake/Qt5/ ..
+ ninja
+ \endcode
+
+ \section2 CMake Configure Options
+
+ \QBS recognizes the following CMake options (passed to CMake in the form of \c{-DOPTION=value})
+ to customize the build:
+
+ \table
+ \header \li Option \li Notes \li Default value
+ \row \li WITH_TESTS \li Enable autotests. \li \c ON
+ \row \li WITH_UNIT_TESTS \li Enable additional autotests. \li \c OFF
+ \row \li WITH_PROJECT_FILE_UPDATES \li Enable API for updating project files. This
+ implies a dependency to the QtGui module.
+ \li \c OFF
+ \row \li INSTALL_PUBLIC_HEADERS \li Whether to install public headers. \li \c ON
+ \endtable
+
+ \section2 Using ccache with CMake
+
+ To enable using \l{https://ccache.dev}{ccache} when building \QBS, pass the following options
+ to CMake:
+ \code
+ cmake -DQt5_DIR=${QT_DIR}/lib/cmake/Qt5/ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ..
+ \endcode
+
\section1 Building \QBS with QMake
To build \QBS, enter the following command: