diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-10-06 15:22:10 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2020-10-07 13:25:58 +0200 |
commit | 9ef4411d81ddab7a8d3ea46b0323fa5287806ea1 (patch) | |
tree | 61f4219fab408478af9c155658572e7dd0c73b76 | |
parent | 539cd49cee388189793c4691c4ce904825e156b2 (diff) |
CMake: Document convenience scripts in README
Change-Id: I7ec7f01f744285fc086de8a0430afbf49563adce
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | cmake/README.md | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/cmake/README.md b/cmake/README.md index 872e93b2f8..3ac875605f 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -252,3 +252,48 @@ While the supporting code for building with vcpkg is still there, it is not test | ``qtHaveModule(foo)`` | ``if(TARGET Qt::foo)`` | | ``qtConfig(foo)`` | ``if (QT_FEATURE_foo)`` | + +# Convenience Scripts + +A Qt installation's bin directory contains a number of convenience scripts. + +## qt-cmake + +This is a wrapper around the CMake executable which passes a Qt-internal `CMAKE_TOOLCHAIN_FILE`. Use +this to build projects against the installed Qt. + +## qt-cmake-private + +The same as `qt-cmake`, but in addition, sets the CMake generator to Ninja. + +Example: + +``` +$ cd some/empty/directory +$ ~/Qt/6.0.0/bin/qt-cmake-private ~/source/of/qtdeclarative -DFEATURE_qml_network=OFF +$ cmake --build . && cmake --install . +``` + +## qt-configure-module + +Call the configure script for a single Qt module, doing a CMake build. + +Example: + +``` +$ cd some/empty/directory +$ ~/Qt/6.0.0/bin/qt-configure-module ~/source/of/qtdeclarative -no-feature-qml-network +$ cmake --build . && cmake --install . +``` + +## qt-cmake-standalone-test + +Build a single standalone test outside the Qt build. + +Example: + +``` +$ cd some/empty/directory +$ ~/Qt/6.0.0/bin/qt-cmake-standalone-test ~/source/of/qtbase/test/auto/corelib/io/qprocess +$ cmake --build . +``` |