I am doing some POC where in I need to build for linux target on Windows build system **without ** even WSL. So what I want to do is below.
Build for Linux target on windows build system
Take the build executable and copy it to Linux/ Ubuntu machines and should be able to run.
I know cmake supports cross-platform builds. But could not find out from where I will get Linux related libraries/so (Linux environment) to build my target.
Visual Studio supports building on Windows for Linux. However, it requires either a remote SSH Linux machine connection, or using WSL on the local computer.
It seems you might want an offline build instead. There are old Cygwin posts about doing this. People have asked about doing this with MSYS2 but I haven’t seen an exact procedure.
If perhaps none of those are suitable, I would consider CI/CD (like GitHub Actions or many other online and offline choices) where when the developer Git pushes, the server/worker job provides binaries across operating systems. That would be a general way to accomplish such tasks repeatably, although quite distinct from your POC.