aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorHaowei Hsu <hwhsu1231@gmail.com>2023-05-10 13:32:28 +0800
committerCristian Adam <cristian.adam@qt.io>2023-07-05 15:44:35 +0000
commit745346cf315181ab46ce8095cea4324bf3bf2424 (patch)
tree93747231fa7a9d9081d59af82a0640e3ac80bf30 /README.md
parentfe8c276d11f8385ae65da831a3041d1214577833 (diff)
.gitignore: Ignore CMakeUserPreset.json
And add a template of CMakeUserPresets.json for building on Windows platform in README.md Fixes: QTCREATORBUG-29137 Change-Id: I359a9894e448acb1203de0c6acfc508e65655c03 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'README.md')
-rw-r--r--README.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/README.md b/README.md
index 151be8c678..4bb9109cab 100644
--- a/README.md
+++ b/README.md
@@ -164,6 +164,44 @@ Thus, if you want to work on Qt Creator using Qt Creator, you need a separate
installation of it. We recommend using a separate, release-built version of Qt
Creator to work on a debug-built version of Qt Creator.
+Alternatively, take the following template of `CMakeUserPresets.json` for
+reference. Write your own configurePreset inheriting `cmake-plugin-minimal` in
+`CMakeUserPresets.json` to build with IDEs (such as QtCreator, VSCode,
+CLion...etc) locally:
+
+```json
+{
+ "version": 4,
+ "cmakeMinimumRequired": {
+ "major": 3,
+ "minor": 23,
+ "patch": 0
+ },
+ "configurePresets": [
+ {
+ "name": "custom",
+ "displayName": "custom",
+ "description": "custom",
+ "inherits": "cmake-plugin-minimal",
+ "binaryDir": "${sourceDir}/build/${presetName}",
+ "toolset": {
+ "value": "v142,host=x64",
+ "strategy": "external"
+ },
+ "architecture": {
+ "value": "x64",
+ "strategy": "external"
+ },
+ "cacheVariables": {
+ "CMAKE_CXX_COMPILER": "cl.exe",
+ "CMAKE_C_COMPILER": "cl.exe",
+ "CMAKE_PREFIX_PATH": "c:/Qt/6.2.4/msvc2019_64"
+ }
+ }
+ ]
+}
+```
+
### Options
If you do not have Ninja installed and in the `PATH`, remove `-G Ninja` from