Rachael wrote:someone
I did. It was for building PowerPC binaries on x86 Macs without needing to produce universal binaries (which comes with a lot of limitations since build systems aren't really cut out for that kind of thing). To that end it actually is documented
here. Since GZDoom no longer supports that I can't say that the cross compiling feature has ever been tested against anything.
As it so happens I just set up a script to capture how to cross compile on ECWolf so
here's the general idea on how to use it to compile with MinGW on Linux (you can find Android in that file as well). For Linux to Linux just with a different arch you should be able to get away with just setting the C and C++ compilers, turning on FORCE_CROSSCOMPILE, and supplying IMPORT_EXECUTABLES but you may have to do more. The main thing to look out for is system include contamination which can be somewhat influenced by CMAKE_FIND_ROOT_PATH. Basically check the advanced options in CMake and make sure that all the INCLUDE_DIR variables are what you expect them to be.
Officially what CMake recommends is building out a
toolchain file, and your distro might provide one for its cross compilers.