Files
2026-07-13 13:18:05 +08:00

156 lines
3.8 KiB
JSON

{
"version": 10,
"cmakeMinimumRequired": {
"major": 3,
"minor": 31,
"patch": 0
},
"configurePresets": [
{
"$comment": [
"default build config for any env",
"needs: vcpkg",
"vcpkg install root should be in environments as VCPKG_ROOT"
],
"name": "default",
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"cacheVariables": {
"CMAKE_PREFIX_PATH": "${sourceDir}/cmake"
}
},
{
"name": "x64-windows-static",
"$comment": ["build config for x64 windows"],
"inherits": "default",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-windows-static"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "arm64-windows-static",
"$comment": ["build config for arm64 windows"],
"inherits": "default",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "arm64-windows-static"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "x64-linux",
"$comment": ["build config for x64 linux"],
"inherits": "default",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x64-linux",
"CMAKE_MAKE_PROGRAM": "/usr/bin/ninja",
"CMAKE_C_COMPILER": "/usr/bin/cc",
"CMAKE_CXX_COMPILER": "/usr/bin/c++"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "arm64-linux",
"$comment": ["build config for arm64 linux"],
"inherits": "default",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "arm64-linux",
"CMAKE_ASM_NASM_COMPILER": "/usr/bin/nasm",
"CMAKE_MAKE_PROGRAM": "/usr/bin/ninja",
"CMAKE_C_COMPILER": "/usr/bin/cc",
"CMAKE_CXX_COMPILER": "/usr/bin/c++"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "arm64-osx",
"$comment": ["build config for arm64 osx"],
"inherits": "default",
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "arm64-osx",
"CMAKE_MAKE_PROGRAM": "/opt/homebrew/bin/ninja",
"CMAKE_ASM_NASM_COMPILER": "/opt/homebrew/bin/nasm",
"CMAKE_C_COMPILER": "/usr/bin/cc",
"CMAKE_CXX_COMPILER": "/usr/bin/c++"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
}
],
"buildPresets": [
{
"name": "default",
"configurePreset": "default",
"jobs": 8
},
{
"name": "x64-windows-static",
"inherits": "default",
"configurePreset": "x64-windows-static",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "arm64-windows-static",
"inherits": "default",
"configurePreset": "arm64-windows-static",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "x64-linux",
"inherits": "default",
"configurePreset": "x64-linux",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "arm64-linux",
"inherits": "default",
"configurePreset": "arm64-linux",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "arm64-osx",
"inherits": "default",
"configurePreset": "arm64-osx",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
}
]
}