diff --git a/dist/changelog/changes-14.0.0.md b/dist/changelog/changes-14.0.0.md index 2c0715e9b3b..7d14123acae 100644 --- a/dist/changelog/changes-14.0.0.md +++ b/dist/changelog/changes-14.0.0.md @@ -163,7 +163,11 @@ Projects [QTCREATORBUG-29559](https://bugreports.qt.io/browse/QTCREATORBUG-29559), [QTCREATORBUG-30385](https://bugreports.qt.io/browse/QTCREATORBUG-30385)) * Made it possible to register debuggers + ([QTCREATORBUG-30836](https://bugreports.qt.io/browse/QTCREATORBUG-30836)) * Added support for custom build types + ([QTCREATORBUG-30014](https://bugreports.qt.io/browse/QTCREATORBUG-30014)) + + ([Documentation](https://doc-snapshots.qt.io/qtcreator-14.0/creator-build-settings-cmake-presets.html)) ### Workspace diff --git a/doc/qtcreator/src/cmake/creator-projects-cmake-presets.qdoc b/doc/qtcreator/src/cmake/creator-projects-cmake-presets.qdoc index 050b0b1f8c7..41937eb6b92 100644 --- a/doc/qtcreator/src/cmake/creator-projects-cmake-presets.qdoc +++ b/doc/qtcreator/src/cmake/creator-projects-cmake-presets.qdoc @@ -57,12 +57,26 @@ }, "environment": { "AN_ENVIRONMENT_FLAG": "1" + } + }, + "vendor": { + "qt.io/QtCreator/1.0": { + "AskBeforePresetsReload": false, + "AskReConfigureInitialParams": false, + "AutorunCMake": false, + "PackageManagerAutoSetup": false, + "ShowAdvancedOptionsByDefault": true, + "ShowSourceSubFolders": false, + "UseJunctionsForSourceAndBuildDirectories": true + } } - } ] } \endcode + For more information about the CMake project settings in the \c vendor + section, see \l {Override CMake settings for a project}. + \section1 MinGW Example The following example configures a Qt project with: @@ -74,6 +88,7 @@ \li generator – MinGW Makefiles \li path to a CMake executable \li path to the Qt installation via \c CMAKE_PREFIX_PATH + \li GNU gdb 11.2.0 for MinGW 11.2.0 64-bit debugger \endlist \badcode @@ -92,8 +107,17 @@ }, "environment": { "PATH": "C:/Qt/Tools/mingw1120_64/bin;$penv{PATH}" - } - } + }, + "vendor": { + "qt.io/QtCreator/1.0": { + "debugger": { + "DisplayName": "GNU gdb 11.2.0 for MinGW 11.2.0 64-bit", + "Abis": ["x86-windows-msys-pe-64bit"], + "Binary": "C:/Qt/Tools/mingw1120_64/bin/gdb.exe", + "EngineType": 1, + "Version": "11.2.0" + } + } ] } \endcode @@ -188,6 +212,50 @@ } \endcode + \section1 Cross-Compilation Example + + The following example configures a Qt project for cross-compilation on \macos + for Windows and running with the \c wine emulator on \macos: + + \list + \li generator – Ninja + \li build directory – \c /build-release + \li LLVM/MinGW toolchain + \li configuration type – \c CMAKE_BUILD_TYPE as \c Release + \li LLDB 18.1.6 debugger + \li \c wine emulator + \endlist + + \badcode + { + "version": 4, + "configurePresets": [ + { + "name": "llvm-mingw", + "displayName": "LLVM-MinGW 18.1.6", + "generator": "Ninja", + "binaryDir": "${sourceDir}/build-release", + "toolchainFile": "llvm-mingw.cmake", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "Release", + "CMAKE_CROSSCOMPILING_EMULATOR": "/opt/homebrew/bin/wine" + }, + "vendor": { + "qt.io/QtCreator/1.0": { + "debugger": { + "DisplayName": "LLDB 18.1.6 (CMake Preset)", + "Abis": ["x86-darwin-generic-mach_o-64bit", "arm-darwin-generic-mach_o-64bit"], + "Binary": "/Users/jdoe/llvm-mingw/bin/lldb", + "EngineType": 256, + "Version": "18.1.6" + } + } + } + } + ] + } + \endcode + \section1 Using Conditions The following configure presets are used if they match \c condition. That is, diff --git a/doc/qtcreator/src/cmake/creator-projects-settings-cmake.qdoc b/doc/qtcreator/src/cmake/creator-projects-settings-cmake.qdoc index 95921a00a64..24f65674e30 100644 --- a/doc/qtcreator/src/cmake/creator-projects-settings-cmake.qdoc +++ b/doc/qtcreator/src/cmake/creator-projects-settings-cmake.qdoc @@ -67,6 +67,9 @@ \li \l{Using Junction Points on Windows} \endtable + You can set these preferences as \l{Configure Presets}{CMake presets} or in + a \l{Share project settings}{CMakeLists.txt.shared} file. + \sa {Build with CMake}{How To: Build with CMake}, {CMake}, {Configuring Projects} */ diff --git a/doc/qtcreator/src/conan/creator-projects-conan.qdoc b/doc/qtcreator/src/conan/creator-projects-conan.qdoc index 0e7229ba7c3..67cdd9141ae 100644 --- a/doc/qtcreator/src/conan/creator-projects-conan.qdoc +++ b/doc/qtcreator/src/conan/creator-projects-conan.qdoc @@ -44,9 +44,16 @@ Then, you must edit the build settings of the project to specify the location of the file and the contents of the Conan install command. - Alternatively, you can automatically set up the Conan package manager for - use with CMake. + \section1 Automatic Package Manager Setup + + To automatically set up the Conan package manager for use with CMake, + go to \uicontrol Projects > \uicontrol {Project Settings} > \uicontrol CMake, + and select \uicontrol {Package manager auto setup}. + + To turn off the automatic package manager setup, set + \c PackageManagerAutoSetup to \c false in \l{Configure Presets} + {CMake presets} or a \l{Share project settings}{CMakeLists.txt.shared} file. \sa {Conan Build Configuration}, {Enable and disable plugins}, - {Using CMake with Package Managers} + {Override CMake settings for a project}, {Using CMake with Package Managers} */ diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc index 3e48923ad36..09898e8f56e 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-settings-sharing.qdoc @@ -20,7 +20,8 @@ has the same XML structure as a \e {.user} file, but only has the settings to share. - \note Use \l{CMake Presets} to share CMake project settings. + To share CMake project settings, use \l{CMake Presets} or a + \c {CMakeLists.txt.shared} file. \section1 Create a shared settings file @@ -72,5 +73,38 @@ a permanent sticky setting that was created just because you wanted to try something out. + \section1 Share CMake project settings + + The following is an example of a \c {CMakeLists.txt.shared} file: + + \badcode + + + + + ProjectExplorer.Project.PluginSettings + + + false + false + false + false + true + false + false + true + + + + + Version + 22 + + + \endcode + + For more information about the settings, see + \l {Override CMake settings for a project}. + \sa {Configuring Projects}, {CMake Presets} */