How to cross compile from linux to all desktop OSes and architectures

I’m trying to cross compile from github actions for all the desktop OSes and architectures. Github actions part is only relevant to always starting from a fresh install of ubuntu 24.04

Host is always ubuntu 24.04 x86_64, targets are following
1-) linux x86_64
2-) linux aarch64
3-) windows x86_64
4-) windows aarch64
5-) mac x86_64
6-) mac aarch64

I tried bunch of ways, but always ended up compiling for a single architecture. What is the correct way of doing cross compile?
I suspect I’m missing tools to perform cross compile, so CMake silently does the wrong thing.

My commands are following:
1-) cmake -B build/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=TARGET_ARCHITECTURE
2-) cmake --build build/ --config Release