Building multiple WinRT executables with custom appxmanifests in one cmake script fails

Building a project that builds multiple UWP executables with all having a custom manifest fails.

Consider this cmake project that creates multiple executables, all having custom app manifests.
Configuring and building the project on the console fails because the image assets could not be found.

> cmake -S . -B build -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.0 -Dnumber_targets=2
...
> cmake --build build
...
C:\Users\maarten\source\repos\scratch-uwp\build\target0.appxmanifest(22,97): error APPX0703: Manifest
 references file 'square-150x150.png' which is not part of the payload. [C:\Users\maarte
n\source\repos\scratch-uwp\build\target0.vcxproj]
C:\Users\maarten\source\repos\scratch-uwp\build\target0.appxmanifest(22,149): error APPX0703: Manifes
t references file 'square-44x44.png' which is not part of the payload. [C:\Users\maarten
\source\repos\scratch-uwp\build\target0.vcxproj]
C:\Users\maarten\source\repos\scratch-uwp\build\target0.appxmanifest(23,27): error APPX0703: Manifest
 references file 'splash.png' which is not part of the payload. [C:\Users\maarten\sou
rce\repos\scratch-uwp\build\target0.vcxproj]
...

When I remove the build folder, reconfigure and open the project in Visual Studio,
I can build the targets only once.

> rd /s /q build
> cmake -S . -B build -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.0 -Dnumber_targets=2
...
> cmake --open build
  1. Build target0 first: this should succeed.
    1. Rightclick on target0
    2. Click on Build
  2. Then, build target1: this succeeds as well.
    1. Rightclick on target 1
    2. Click on Build
  3. Build target0 again: this fails!
    1. Rightclick on target0
    2. Click on Build

The output window shows a message that suggests target0.appxmanifest references target1.exe, which it does not.

Build started...
1>------ Build started: Project: target0, Configuration: Debug x64 ------
1>target0.vcxproj -> C:\Users\maarten\source\repos\scratch-uwp\build\Debug\target0.exe
1>C:\Users\maarten\source\repos\scratch-uwp\build\target0.appxmanifest : error APPX0703: Manifest references file 'target1.exe' which is not part of the payload.
1>Done building project "target0.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

Am I doing something wrong?

System information:

>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30148 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]
>ver

Microsoft Windows [Version 10.0.19044.2846]
>msbuild
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
>devenv

Microsoft Visual Studio 2019 Version 16.11.26.
Copyright (C) Microsoft Corp. All rights reserved.

I apparently screwed up embedded images that caused the build to fail.
After fixing the image sizes, the issue of not being able to rebuild the executables remain.
I will open a new thread for this as the reproducer has become much easier.