From 9ef4411d81ddab7a8d3ea46b0323fa5287806ea1 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 6 Oct 2020 15:22:10 +0200 Subject: CMake: Document convenience scripts in README Change-Id: I7ec7f01f744285fc086de8a0430afbf49563adce Reviewed-by: Alexandru Croitor --- cmake/README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'cmake') 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 . +``` -- cgit v1.2.3