Build libc++ with MSVS, CMake and Ninja

Building LIBC++ :

cmake -G Ninja -B buildlib -S runtimes -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
 -DCMAKE_INSTALL_PREFIX=../llvm-install \
 -DLLVM_TARGETS_TO_BUILD=X86_64 \
 -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON \
 -DCMAKE_BUILD_TYPE=Release \
 -DCXX_SUPPORTS_FNO_EXCEPTIONS_FLAG=ON \
 -DCXX_SUPPORTS_FUNWIND_TABLES_FLAG=ON

Looks ok, running Ninja

ninja -C buildlib cxx cxxabi unwind

ninja: error: build.ninja:449: multiple rules generate lib/unwind.lib [-w dupbuild=err]

The reason:

CMake generates in build.ninja

#############################################
# Link the shared library lib\unwind.dll

build lib\unwind.dll lib\unwind.lib

And in the same file below:

#############################################
# Link the static library lib\unwind.lib

build lib\unwind.lib

The meaning is clear - we are going to generate both static and shared libs and the lib name is the same. But what is recommended way to resolve the conflict and create correct build?

cmake version 3.25.0-rc4
ninja - 1.10.2
Compiler Visual Studio 2019
OS - Win 10