Build universal go binaries on macOS


That is required to enable CI configurations that test universal
binaries.
Previously the go servers were only build using the host CPU
architecture.

To avoid code duplication, move the logic into a helper CMake
function.
Update the code of the functions in such way that it outputs the
compiled binaries into CMAKE_CURRENT_BINARY_DIR instead of the
source dir. This allows us to remove the POST_BUILD commands that
copie the binaries.

Fixes: QTBUG-141860
Change-Id: I2ab4f64ffa4ff9898d2a84abd24b7e462a62e58c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
commit357b4fc2f8d86a3a58434c15d04706ee7dc45e73
parent3d2af282a6c0ae4369aadff625fdb07d79184a33
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeTue, 11 Nov 2025 15:35:29 +0100