Add CMake vcpkg UI validation target

This commit is contained in:
2026-06-05 13:04:34 +02:00
parent 3e5340b696
commit e731c06330
6 changed files with 78 additions and 9 deletions

View File

@@ -12,6 +12,13 @@ pp_add_powershell_automation_target(panopainter_platform_build_android_assets
-Presets android-arm64,android-x64,android-quest-arm64,android-focus-arm64
-Targets pp_assets)
pp_add_powershell_automation_target(panopainter_platform_build_vcpkg_ui_core
COMMENT "Build the Windows vcpkg-backed UI core dependency boundary."
ARGUMENTS
-File "${CMAKE_CURRENT_SOURCE_DIR}/scripts/automation/platform-build.ps1"
-Presets windows-msvc-vcpkg-headless
-Targets pp_ui_core,pp_ui_core_layout_xml_tests)
pp_add_powershell_automation_target(panopainter_platform_build_apple_remote
COMMENT "Run remote Apple compile validation for macOS, iOS simulator, and iOS device."
ARGUMENTS

View File

@@ -71,6 +71,7 @@ $env:VCPKG_ROOT = "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vc
cmake --preset windows-msvc-vcpkg-headless
powershell -ExecutionPolicy Bypass -File scripts\automation\platform-build.ps1 -Presets windows-msvc-vcpkg-headless
ctest --preset desktop-fast-vcpkg --build-config Debug
cmake --build --preset windows-msvc-default --config Debug --target panopainter_platform_build_vcpkg_ui_core
cmake --preset android-arm64
powershell -ExecutionPolicy Bypass -File scripts\automation\platform-build.ps1 -Presets android-arm64
powershell -ExecutionPolicy Bypass -File scripts\automation\android-legacy-package-build.ps1 -Packages standard
@@ -99,6 +100,10 @@ Known local toolchain state:
- Local Visual Studio generator selected by CMake: Visual Studio 17 2022
- Bundled vcpkg: `C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg`
(`vcpkg version` reports 2025-11-19)
- External vcpkg: `D:\vcpkg` is currently resolved by
`scripts/automation/platform-build.ps1` when `VCPKG_ROOT` is already set on
this host; the wrapper falls back to bundled Visual Studio vcpkg roots when
needed.
- Android SDK: `C:\Users\omara\AppData\Local\Android\Sdk`
- Android NDK: latest SDK Manager package selected by
`scripts/automation/android-sdk-env.ps1`; currently
@@ -200,7 +205,8 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p
root CMake package targets yet.
- Root CMake exposes non-default platform validation targets:
`panopainter_platform_build_headless`,
`panopainter_platform_build_android_assets`, and
`panopainter_platform_build_android_assets`,
`panopainter_platform_build_vcpkg_ui_core`, and
`panopainter_platform_build_apple_remote`. These targets call the existing
platform automation scripts from CMake and keep platform validation discoverable
from the CMake target graph while app/package target migration remains open.
@@ -610,7 +616,9 @@ powershell -ExecutionPolicy Bypass -File scripts\automation\apple-remote-build.p
of owning active WGL context/pixel-format attribute literals in `main.cpp`.
- `windows-msvc-vcpkg-headless` validates manifest install/configure/build/test
for the current headless component matrix; see DEBT-0007 for remaining app
and platform triplet migration.
and platform triplet migration. Root CMake target
`panopainter_platform_build_vcpkg_ui_core` focuses that gate on the
vcpkg-backed `pp_ui_core`/tinyxml2 boundary and `pp_ui_core_layout_xml_tests`.
- `scripts/automation/analyze.*` runs shader validation plus a
renderer-boundary guard that reports JSON and fails if active non-backend
source code reintroduces raw `GL_*`/`WGL_*` constants outside the allowed

File diff suppressed because one or more lines are too long

View File

@@ -298,7 +298,11 @@ exist. `windows-clangcl-asan` now configures as a headless Ninja/clang-cl ASan
preset and uses the release MSVC runtime required by clang-cl ASan, but local
ASan builds are blocked by DEBT-0014 until Clang and the selected MSVC STL are
compatible. Dependency migration is not complete until remaining component
dependencies and mobile/Apple triplets are validated.
dependencies and mobile/Apple triplets are validated. Root CMake now also
exposes `panopainter_platform_build_vcpkg_ui_core`, a focused automation target
that resolves `VCPKG_ROOT` through the platform-build wrapper and validates the
vcpkg-backed `pp_ui_core`/tinyxml2 XML test boundary from the CMake target
graph.
Implementation tasks:
@@ -1386,7 +1390,8 @@ Focus/Wave arm64. The shell wrapper now mirrors the PowerShell wrapper's
multi-preset behavior and reports one structured result array. Root CMake now
also exposes non-default platform validation targets:
`panopainter_platform_build_headless`,
`panopainter_platform_build_android_assets`, and
`panopainter_platform_build_android_assets`,
`panopainter_platform_build_vcpkg_ui_core`, and
`panopainter_platform_build_apple_remote`; the platform-build self-test guards
those target names and the wrapper matrix now includes
`pp_app_core_app_dialog_tests` with the rest of the CMake test executables.
@@ -2408,11 +2413,14 @@ Results:
still-blocked Windows AppX package state.
- Root CMake now exposes platform validation targets for the default headless
platform-build sweep, the Android standard/Quest/Focus root CMake asset
component sweep, and the remote Apple compile gate. `cmake --build --preset
component sweep, the vcpkg-backed UI core dependency boundary, and the
remote Apple compile gate. `cmake --build --preset windows-msvc-default
--config Debug --target panopainter_platform_build_android_assets` validated
`pp_assets` across Android arm64, Android x64, Quest arm64, and Focus/Wave
arm64 with the latest SDK-managed NDK/CMake pair; `cmake --build --preset
windows-msvc-default --config Debug --target
panopainter_platform_build_android_assets` validated `pp_assets` across
Android arm64, Android x64, Quest arm64, and Focus/Wave arm64 with the latest
SDK-managed NDK/CMake pair.
panopainter_platform_build_vcpkg_ui_core` validated `pp_ui_core` and
`pp_ui_core_layout_xml_tests` through the vcpkg tinyxml2 preset.
- Desktop VR drawing now routes generic OpenGL scissor/depth/blend state,
blend/depth state snapshots and restores, depth clears, active texture units,
and fallback 2D texture unbinds through tested renderer GL backend dispatch;

View File

@@ -94,11 +94,50 @@ function Expand-ArgumentList {
return $expanded
}
function Get-VcpkgRoot {
$candidates = @()
if ($env:VCPKG_ROOT) {
$candidates += $env:VCPKG_ROOT
}
$programFiles = @($env:ProgramFiles, ${env:ProgramFiles(x86)}) | Where-Object { $_ }
$vsYears = @("2026", "2022")
$vsEditions = @("Community", "Professional", "Enterprise", "BuildTools", "Preview")
foreach ($root in $programFiles) {
foreach ($year in $vsYears) {
foreach ($edition in $vsEditions) {
$candidates += (Join-Path $root "Microsoft Visual Studio\$year\$edition\VC\vcpkg")
}
}
}
foreach ($candidate in $candidates) {
if ($candidate -and (Test-Path -LiteralPath (Join-Path $candidate "vcpkg.exe") -PathType Leaf)) {
return (Resolve-Path -LiteralPath $candidate).Path
}
}
throw "VCPKG_ROOT was not set and no Visual Studio bundled vcpkg root was found."
}
function Set-VcpkgRootEnvironment {
$vcpkgRoot = Get-VcpkgRoot
$env:VCPKG_ROOT = $vcpkgRoot
return [ordered]@{
vcpkgRoot = $vcpkgRoot
vcpkgCommand = Join-Path $vcpkgRoot "vcpkg.exe"
}
}
$Presets = @(Expand-ArgumentList -Values $Presets)
$Targets = @(Expand-ArgumentList -Values $Targets)
$cmakeCommand = "cmake"
$androidToolchain = $null
$vcpkgToolchain = $null
if ($Presets | Where-Object { $_ -like "*vcpkg*" }) {
$vcpkgToolchain = Set-VcpkgRootEnvironment
}
if ($Presets | Where-Object { $_ -like "android-*" }) {
. "$PSScriptRoot\android-sdk-env.ps1"
$androidToolchain = Set-AndroidSdkToolchainEnvironment
@@ -152,6 +191,7 @@ $elapsed = [int]((Get-Date) - $started).TotalMilliseconds
exitCode = $overallExitCode
elapsedMs = $elapsed
androidToolchain = $androidToolchain
vcpkgToolchain = $vcpkgToolchain
results = $results
} | ConvertTo-Json -Compress -Depth 6

View File

@@ -33,6 +33,7 @@ REQUIRED_ANDROID_PRESETS = [
EXPECTED_CMAKE_PLATFORM_TARGETS = [
"panopainter_platform_build_headless",
"panopainter_platform_build_android_assets",
"panopainter_platform_build_vcpkg_ui_core",
"panopainter_platform_build_apple_remote",
]