From 6a74c829dfe7b8f159e20f43af7bbdf021318d21 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 12 Mar 2024 15:06:00 +0100 Subject: [PATCH] Doc: Extend "Using CMake with Conan" to vcpkg The automatic setup also works with vcpkg. Change-Id: I755e59ef0a88105da195e9abe30adca5e3011fae Reviewed-by: Cristian Adam --- .../creator-projects-cmake-building.qdoc | 28 +++++++++++-------- .../src/conan/creator-projects-conan.qdoc | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc b/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc index 0bf54dde2fb..c71a8bed8cc 100644 --- a/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc +++ b/doc/qtcreator/src/cmake/creator-projects-cmake-building.qdoc @@ -145,8 +145,8 @@ To view all variables, select the \uicontrol Advanced check box. - To view all variables by default, select \preferences > \uicontrol CMake > - \uicontrol General > \uicontrol {Show advanced options by default}. + To view all variables by default, go to \preferences > \uicontrol CMake > + \uicontrol General and select \uicontrol {Show advanced options by default}. \image qtcreator-preferences-cmake-general.webp "General tab in CMake Preferences" @@ -159,8 +159,8 @@ stored in the CMakeLists.txt.user file, so deleting a build directory does not delete the initial configuration. - To be asked before \QC resets the changes, select \preferences > - \uicontrol CMake > \uicontrol General > + To be asked before \QC resets the changes, go to \preferences > + \uicontrol CMake > \uicontrol General and select \uicontrol {Ask before re-configuring with initial parameters}. \section1 Viewing CMake Output @@ -268,16 +268,20 @@ \uicontrol Build > \uicontrol {Rebuild Project}. This cleans up the build directory and performs a new build. - \section1 Using CMake with Conan + \section1 Using CMake with Package Managers - \QC can automatically set up the \l {Conan Package Manager} for use with - CMake. + To automatically set up the \l {Conan Package Manager}{Conan} or + \l {vcpkg Package Manager}{vcpkg} package manager for use with CMake: - Select \preferences > \uicontrol CMake - \uicontrol General > \uicontrol {Package manager auto setup} to set the - value of the \c CMAKE_PROJECT_INCLUDE_BEFORE variable to the path to a - CMake script that installs dependencies from a \c conanfile.txt, - \c conanfile.py, or \c vcpkg.json file in the project source directory. + \list 1 + \li Create a CMake script file that installs dependencies from a + \c conanfile.txt, \c conanfile.py, or \c vcpkg.json file in + the project source directory. + \li Set the path to the script as the value of the + \c CMAKE_PROJECT_INCLUDE_BEFORE variable. + \li Go to \preferences > \uicontrol CMake > \uicontrol General and select + \uicontrol {Package manager auto setup}. + \endlist \section1 QTC_RUN Environment Variable diff --git a/doc/qtcreator/src/conan/creator-projects-conan.qdoc b/doc/qtcreator/src/conan/creator-projects-conan.qdoc index 0e1f60e664b..0e7229ba7c3 100644 --- a/doc/qtcreator/src/conan/creator-projects-conan.qdoc +++ b/doc/qtcreator/src/conan/creator-projects-conan.qdoc @@ -48,5 +48,5 @@ use with CMake. \sa {Conan Build Configuration}, {Enable and disable plugins}, - {Using CMake with Conan} + {Using CMake with Package Managers} */