Files
Schedule/CMakePresets.json
T
Misaki aee778519f 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.
2026-10-26 14:15:03 +08:00

149 lines
3.8 KiB
JSON

{
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 24,
"patch": 0
},
"configurePresets": [
{
"name": "linux-gcc",
"displayName": "Linux GCC (Qt 6.6.3)",
"description": "Debug build using the local Qt 6.6.3 installation",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/linux-gcc",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_PREFIX_PATH": "/home/misaki/Qt6.3/6.6.3/gcc_64",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"SCHEDULE_WARNINGS_AS_ERRORS": "ON"
},
"warnings": {
"deprecated": false
}
},
{
"name": "linux-gcc-release",
"displayName": "Linux GCC Release (Qt 6.6.3)",
"inherits": "linux-gcc",
"binaryDir": "${sourceDir}/build/linux-gcc-release",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
},
"warnings": {
"deprecated": false
}
},
{
"name": "windows-msvc",
"displayName": "Windows MSVC (edit Qt path in preset)",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/windows-msvc",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_PREFIX_PATH": "C:/Qt/6.6.3/msvc2019_64"
},
"warnings": {
"deprecated": false
}
},
{
"name": "windows-mingw",
"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": "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": {
"deprecated": false
}
},
{
"name": "macos-clang",
"displayName": "macOS Clang (edit Qt path in preset)",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/macos-clang",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_PREFIX_PATH": "/Users/yourname/Qt/6.6.3/macos"
},
"warnings": {
"deprecated": false
}
}
],
"buildPresets": [
{
"name": "linux-gcc",
"configurePreset": "linux-gcc"
},
{
"name": "linux-gcc-release",
"configurePreset": "linux-gcc-release"
},
{
"name": "windows-msvc",
"configurePreset": "windows-msvc"
},
{
"name": "windows-mingw",
"configurePreset": "windows-mingw"
},
{
"name": "macos-clang",
"configurePreset": "macos-clang"
}
],
"testPresets": [
{
"name": "linux-gcc",
"configurePreset": "linux-gcc",
"output": {
"outputOnFailure": true
},
"environment": {
"QT_QPA_PLATFORM": "offscreen"
}
},
{
"name": "linux-gcc-release",
"configurePreset": "linux-gcc-release",
"output": {
"outputOnFailure": true
},
"environment": {
"QT_QPA_PLATFORM": "offscreen"
}
},
{
"name": "windows-msvc",
"configurePreset": "windows-msvc",
"output": {
"outputOnFailure": true
},
"environment": {
"QT_QPA_PLATFORM": "offscreen",
"PATH": "C:/Qt/6.6.3/msvc2019_64/bin;$penv{PATH}"
}
},
{
"name": "windows-mingw",
"configurePreset": "windows-mingw",
"output": {
"outputOnFailure": true
},
"environment": {
"QT_QPA_PLATFORM": "offscreen",
"PATH": "C:/Qt/6.6.3/mingw_64/bin;C:/Qt/Tools/mingw1120_64/bin;$penv{PATH}"
}
}
]
}