obs-studio/CMakePresets.json
PatTheMav bda58bfb8e cmake: Add services preset with OAuth configurations
Allows the use of OAuth credentials set up via environment variables
(as used on CI) without the need for extra plumbing via build scripts.

Also sets GPU_PRIORITY_VAL via preset on Windows.
2023-07-06 20:20:05 +02:00

189 lines
6.3 KiB
JSON

{
"version": 5,
"cmakeMinimumRequired": {
"major": 3,
"minor": 22,
"patch": 0
},
"configurePresets": [
{
"name": "environmentVars",
"hidden": true,
"cacheVariables": {
"TWITCH_CLIENTID": {"type": "STRING", "value": "$penv{TWITCH_CLIENTID}"},
"TWITCH_HASH": {"type": "STRING", "value": "$penv{TWITCH_HASH}"},
"RESTREAM_CLIENTID": {"type": "STRING", "value": "$penv{RESTREAM_CLIENTID}"},
"RESTREAM_HASH": {"type": "STRING", "value": "$penv{RESTREAM_HASH}"},
"YOUTUBE_CLIENTID": {"type": "STRING", "value": "$penv{YOUTUBE_CLIENTID}"},
"YOUTUBE_CLIENTID_HASH": {"type": "STRING", "value": "$penv{YOUTUBE_CLIENTID_HASH}"},
"YOUTUBE_SECRET": {"type": "STRING", "value": "$penv{YOUTUBE_SECRET}"},
"YOUTUBE_SECRET_HASH": {"type": "STRING", "value": "$penv{YOUTUBE_SECRET_HASH}"}
}
},
{
"name": "macos",
"displayName": "macOS",
"description": "Default macOS build (single architecture only)",
"inherits": ["environmentVars"],
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"generator": "Xcode",
"binaryDir": "${sourceDir}/build_macos",
"cacheVariables": {
"ENABLE_BROWSER": true,
"CMAKE_OSX_DEPLOYMENT_TARGET": {"type": "STRING", "value": "11.0"},
"OBS_CODESIGN_TEAM": {"type": "STRING", "value": "$penv{CODESIGN_TEAM}"},
"OBS_CODESIGN_IDENTITY": {"type": "STRING", "value": "$penv{CODESIGN_IDENT}"},
"OBS_PROVISIONING_PROFILE": {"type": "STRING", "value": "$penv{PROVISIONING_PROFILE}"},
"VIRTUALCAM_DEVICE_UUID": {"type": "STRING", "value": "7626645E-4425-469E-9D8B-97E0FA59AC75"},
"VIRTUALCAM_SOURCE_UUID": {"type": "STRING", "value": "A8D7B8AA-65AD-4D21-9C42-66480DBFA8E1"},
"VIRTUALCAM_SINK_UUID": {"type": "STRING", "value": "A3F16177-7044-4DD8-B900-72E2419F7A9A"},
"SPARKLE_APPCAST_URL": {"type": "STRING", "value": "https://obsproject.com/osx_update/updates_$(ARCHS)_v2.xml"},
"SPARKLE_PUBLIC_KEY": {"type": "STRING", "value": "HQ5/Ba9VHOuEWaM0jtVjZzgHKFJX9YTl+HNVpgNF0iM="}
}
},
{
"name": "macos-ci",
"displayName": "macOS (CI)",
"description": "CI macOS build (single architecture only)",
"inherits": ["macos"],
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"CMAKE_COMPILE_WARNING_AS_ERROR": true
}
},
{
"name": "linux-aarch64",
"displayName": "Linux aarch64",
"description": "obs-studio for Linux (aarch64)",
"inherits": ["environmentVars"],
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"binaryDir": "${sourceDir}/build_aarch64",
"generator": "Ninja",
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"ENABLE_WAYLAND": true,
"ENABLE_VLC": true,
"QT_VERSION": "6",
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "linux-ci-aarch64",
"inherits": ["linux-aarch64"],
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "linux-release-aarch64",
"displayName": "Linux aarch64 (Release)",
"description": "obs-studio for Linux (aarch64) - Release Configuration",
"inherits": "linux-aarch64",
"cacheVariables": {
"ENABLE_RELEASE_BUILD": true
}
},
{
"name": "linux-x86_64",
"displayName": "Linux x86_64",
"description": "obs-studio for Linux (x86_64)",
"inherits": ["environmentVars"],
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"binaryDir": "${sourceDir}/build_x86_64",
"generator": "Ninja",
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"ENABLE_WAYLAND": true,
"ENABLE_VLC": true,
"QT_VERSION": {"type": "STRING", "value": "6"},
"CMAKE_BUILD_TYPE": {"type": "STRING", "value": "Debug"}
}
},
{
"name": "linux-ci-x86_64",
"inherits": ["linux-x86_64"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "linux-release-x86_64",
"displayName": "Linux x86_64 (Release)",
"description": "obs-studio for Linux (x86_64) - Release Configuration",
"inherits": "linux-x86_64",
"cacheVariables": {
"ENABLE_RELEASE_BUILD": true,
"ENABLE_BROWSER": true
}
},
{
"name": "windows-x64",
"displayName": "Windows x64",
"description": "Default Windows build (x64)",
"inherits": ["environmentVars"],
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"architecture": "x64",
"binaryDir": "${sourceDir}/build_x64",
"generator": "Visual Studio 17 2022",
"cacheVariables": {
"OBS_CMAKE_VERSION": {"type": "STRING", "value": "3.0.0"},
"ENABLE_BROWSER": true,
"VIRTUALCAM_GUID": {"type": "STRING", "value": "A3FCE0F5-3493-419F-958A-ABA1250EC20B"},
"GPU_PRIORITY_VAL": {"type": "STRING", "value": "$penv{GPU_PRIORITY_VAL}"},
"ENABLE_CCACHE": false
}
},
{
"name": "windows-ci-x64",
"displayName": "Windows x64 (CI)",
"description": "CI Windows build (x64)",
"inherits": ["windows-x64"],
"warnings": {"dev": true, "deprecated": true},
"cacheVariables": {
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
"ENABLE_CCACHE": false
}
}
],
"buildPresets": [
{
"name": "linux-aarch64",
"configurePreset": "linux-aarch64",
"displayName": "Linux aarch64",
"description": "Linux build for aarch64 (aka arm64)",
"configuration": "RelWithDebInfo"
},
{
"name": "linux-x86_64",
"configurePreset": "linux-x86_64",
"displayName": "Linux x86_64",
"description": "Linux build for x86_64 (aka amd64)",
"configuration": "RelWithDebInfo"
},
{
"name": "windows-x64",
"configurePreset": "windows-x64",
"displayName": "Windows 64-bit",
"description": "Windows build for 64-bit (aka x64)",
"configuration": "RelWithDebInfo"
}
]
}