build: use explicit Qt paths in CMake presets
Remove QT_ROOT/MINGW_ROOT environment indirection for Windows and macOS; edit CMAKE_PREFIX_PATH and MinGW compiler paths directly in CMakePresets.json. Document clean reconfigure when paths change.
This commit is contained in:
+12
-12
@@ -36,12 +36,12 @@
|
||||
},
|
||||
{
|
||||
"name": "windows-msvc",
|
||||
"displayName": "Windows MSVC (set QT_ROOT)",
|
||||
"displayName": "Windows MSVC (edit Qt path in preset)",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/windows-msvc",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_PREFIX_PATH": "$env{QT_ROOT}"
|
||||
"CMAKE_PREFIX_PATH": "C:/Qt/6.6.3/msvc2019_64"
|
||||
},
|
||||
"warnings": {
|
||||
"deprecated": false
|
||||
@@ -49,16 +49,16 @@
|
||||
},
|
||||
{
|
||||
"name": "windows-mingw",
|
||||
"displayName": "Windows MinGW-w64 (set QT_ROOT and MINGW_ROOT)",
|
||||
"description": "Debug build using Qt's MinGW kit and the matching MinGW toolchain",
|
||||
"displayName": "Windows MinGW-w64 (edit Qt/MinGW paths in preset)",
|
||||
"description": "Debug build using Qt's MinGW kit; edit the paths below before configuring",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/windows-mingw",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_PREFIX_PATH": "$env{QT_ROOT}",
|
||||
"CMAKE_C_COMPILER": "$env{MINGW_ROOT}/bin/gcc.exe",
|
||||
"CMAKE_CXX_COMPILER": "$env{MINGW_ROOT}/bin/g++.exe",
|
||||
"CMAKE_RC_COMPILER": "$env{MINGW_ROOT}/bin/windres.exe",
|
||||
"CMAKE_PREFIX_PATH": "C:/Qt/6.6.3/mingw_64",
|
||||
"CMAKE_C_COMPILER": "C:/Qt/Tools/mingw1120_64/bin/gcc.exe",
|
||||
"CMAKE_CXX_COMPILER": "C:/Qt/Tools/mingw1120_64/bin/g++.exe",
|
||||
"CMAKE_RC_COMPILER": "C:/Qt/Tools/mingw1120_64/bin/windres.exe",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
|
||||
},
|
||||
"warnings": {
|
||||
@@ -67,12 +67,12 @@
|
||||
},
|
||||
{
|
||||
"name": "macos-clang",
|
||||
"displayName": "macOS Clang (set QT_ROOT)",
|
||||
"displayName": "macOS Clang (edit Qt path in preset)",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/macos-clang",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_PREFIX_PATH": "$env{QT_ROOT}"
|
||||
"CMAKE_PREFIX_PATH": "/Users/yourname/Qt/6.6.3/macos"
|
||||
},
|
||||
"warnings": {
|
||||
"deprecated": false
|
||||
@@ -130,7 +130,7 @@
|
||||
},
|
||||
"environment": {
|
||||
"QT_QPA_PLATFORM": "offscreen",
|
||||
"PATH": "$env{QT_ROOT}/bin;$penv{PATH}"
|
||||
"PATH": "C:/Qt/6.6.3/msvc2019_64/bin;$penv{PATH}"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -141,7 +141,7 @@
|
||||
},
|
||||
"environment": {
|
||||
"QT_QPA_PLATFORM": "offscreen",
|
||||
"PATH": "$env{QT_ROOT}/bin;$env{MINGW_ROOT}/bin;$penv{PATH}"
|
||||
"PATH": "C:/Qt/6.6.3/mingw_64/bin;C:/Qt/Tools/mingw1120_64/bin;$penv{PATH}"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user