diff --git a/dist/changelog/changes-12.0.0.md b/dist/changelog/changes-12.0.0.md index 6e96ada76bb..dd6606dccaf 100644 --- a/dist/changelog/changes-12.0.0.md +++ b/dist/changelog/changes-12.0.0.md @@ -264,6 +264,8 @@ Projects * Added parsing the dependencies from `vcpkg.json` manifest files * Improved the addition of dependencies to `vcpkg.json` +([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-edit-vcpkg-manifest-files.html)) + ### Qt Safe Renderer * Added a wizard for Qt Safe Renderer 2.1 and later diff --git a/doc/qtcreator/images/icons/cmake.png b/doc/qtcreator/images/icons/cmake.png new file mode 100644 index 00000000000..bc68b8b467d Binary files /dev/null and b/doc/qtcreator/images/icons/cmake.png differ diff --git a/doc/qtcreator/images/icons/vcpkg.png b/doc/qtcreator/images/icons/vcpkg.png new file mode 100644 index 00000000000..5a0c40aa64d Binary files /dev/null and b/doc/qtcreator/images/icons/vcpkg.png differ diff --git a/doc/qtcreator/images/qtcreator-vcpkg-cmake-config.webp b/doc/qtcreator/images/qtcreator-vcpkg-cmake-config.webp new file mode 100644 index 00000000000..fd5be5bb3cc Binary files /dev/null and b/doc/qtcreator/images/qtcreator-vcpkg-cmake-config.webp differ diff --git a/doc/qtcreator/images/qtcreator-vcpkg-manifest-file-editor.webp b/doc/qtcreator/images/qtcreator-vcpkg-manifest-file-editor.webp index 1d341a081f4..485e0ea974e 100644 Binary files a/doc/qtcreator/images/qtcreator-vcpkg-manifest-file-editor.webp and b/doc/qtcreator/images/qtcreator-vcpkg-manifest-file-editor.webp differ diff --git a/doc/qtcreator/images/qtcreator-vcpkg-package-selector.webp b/doc/qtcreator/images/qtcreator-vcpkg-package-selector.webp index 97295b6b485..966bc3dbc43 100644 Binary files a/doc/qtcreator/images/qtcreator-vcpkg-package-selector.webp and b/doc/qtcreator/images/qtcreator-vcpkg-package-selector.webp differ diff --git a/doc/qtcreator/src/howto/creator-only/creator-vcpkg.qdoc b/doc/qtcreator/src/howto/creator-only/creator-vcpkg.qdoc index dd498be5db8..2a639e1808f 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-vcpkg.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-vcpkg.qdoc @@ -7,7 +7,7 @@ \ingroup creator-reference-build-systems - \title Managing Packages with vcpkg + \title vcpkg Package Manager \brief The experimental vcpkg plugin integrates the vcpkg C/C++ package manager into \QC. @@ -36,16 +36,31 @@ Select \inlineimage icons/online.png to download vcpkg if you have not installed it yet. - \section1 Creating vcpkg Manifest Files + \sa {Create vcpkg manifest files}, {Edit vcpkg manifest files}, + {Enable and disable plugins} +*/ + +/*! + \page creator-how-to-create-vcpkg-manifest-files.html + \previouspage creator-how-tos.html + + \ingroup creator-how-to-projects + + \title Create vcpkg manifest files To create a new vcpkg package manager manifest (vcpkg.json) file: \list 1 \li Select \uicontrol File > \uicontrol {New File} > - \uicontrol Vcpkg. - \image qtcreator-file-new-file-vcpkg-manifest-file.webp {vcpkg.json Manifest File wizard page} + \uicontrol vcpkg > \uicontrol {vcpkg.json Manifest File} > + \uicontrol Choose to open the \uicontrol Location dialog. + \li In \uicontrol {File name}, enter a name for the manifest file. + \li In \uicontrol Path, enter the path for the manifest file. + \li Select \uicontrol Next to open the + \uicontrol {vcpkg.json Manifest File} dialog. + \image qtcreator-file-new-file-vcpkg-manifest-file.webp {vcpkg.json Manifest File dialog} \li In \uicontrol Name, enter a name for the manifest file. - \li In \uicontrol Version, enter a version number for the file. + \li In \uicontrol {Version string}, enter a version number for the file. \li In \uicontrol Dependencies, enter the packages to manage. You can add packages later in a manifest editor. @@ -57,27 +72,51 @@ The wizard automatically adds the vcpkg.json file to the CMakeLists.txt file of the project. - \section1 Selecting Packages to Manage + \sa {vcpkg Package Manager}, {Edit vcpkg manifest files} +*/ + +/*! + \page creator-how-to-edit-vcpkg-manifest-files.html + \previouspage creator-how-tos.html + + \ingroup creator-how-to-build + + \title Edit vcpkg manifest files When you open a vcpkg.json file, it opens in the manifest file editor: \image qtcreator-vcpkg-manifest-file-editor.webp {vcpkg.json file in the manifest file editor} + \section1 Add packages to manage + To add a package to your project: \list 1 - \li Place the cursor on the line where you want to add a package. - \li Select the \inlineimage icons/zoom.png - (\uicontrol {Search Package}) button. - \image qtcreator-vcpkg-package-selector.webp {Package selector dialog} + \li Select the \inlineimage icons/vcpkg.png + (\uicontrol {Add vcpkg Package}) button on the manifest editor + toolbar. + \image qtcreator-vcpkg-package-selector.webp {Add vcpkg Package dialog} \li Select the package to add to your project. \li Select \uicontrol OK to return to the editor. \li Repeat to add more packages. \endlist - To set the path to the directory where you installed vcpkg, select - \inlineimage icons/settings.png - (\uicontrol Configure) on the editor toolbar. + \section1 Generate code for CMake configuration files - \sa {Enable and disable plugins} + To generate sample CMake code to copy to the CMakeLists.text file: + + \list 1 + \li Select the \inlineimage icons/cmake.png (\uicontrol {CMake Code}) + button on the manifest editor toolbar. + \image qtcreator-vcpkg-cmake-config.webp {CMake Code dialog} + \li Select the example code you need and copy-paste it to the + CMakeLists.txt file. + \endlist + + \section1 Set the path to vcpkg + + To set the path to the directory where you installed vcpkg, select + \inlineimage icons/settings.png (\uicontrol Configure) on the editor toolbar. + + \sa {vcpkg Package Manager}, {Create vcpkg manifest files} */ diff --git a/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc index 21c189a6986..4d9b8b54b9f 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc @@ -65,8 +65,7 @@ \li Class and script files for Python projects. \row \li \uicontrol {vcpkg} (experimental) - \li \l {Managing Packages with vcpkg}{vcpkg package manager} manifest - files (vcpkg.json). + \li vcpkg package manager manifest files (vcpkg.json). \row \li \uicontrol {Nim} (experimental) \li Empty Nim source and script files. @@ -74,7 +73,7 @@ \sa {Create compiler explorer sessions}, {Create C++ classes}, {Create OpenGL fragment and vertex shaders}, {Create resource files}, - {Use project wizards} + {Create vcpkg manifest files}, {Use project wizards} */ /*!