Doc: Extend "Using CMake with Conan" to vcpkg

The automatic setup also works with vcpkg.

Change-Id: I755e59ef0a88105da195e9abe30adca5e3011fae
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Leena Miettinen
2024-03-12 15:06:00 +01:00
parent 1ac1095d4d
commit 6a74c829df
2 changed files with 17 additions and 13 deletions

View File

@@ -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

View File

@@ -48,5 +48,5 @@
use with CMake.
\sa {Conan Build Configuration}, {Enable and disable plugins},
{Using CMake with Conan}
{Using CMake with Package Managers}
*/