How to create swift project for multi architecture for Ninja using CMake

HI, I have a swift project and I want to compile it for both "x86_64" and "arm64" architectures on my Mac for both Xcode & Ninja.

My swift project was successfully compiled for both "x86_64" and "arm64" with Xcode.

But I am facing with multiple values for CMAKE_OSX_ARCHITECTURES not supported with Swift error in CMake while creating the swift project for Ninja.

Pls help to fix this fir Ninja.