Implement CMake, mostly for cross-compiling from non-Windows#11
Implement CMake, mostly for cross-compiling from non-Windows#11nsgomez merged 6 commits intonsgomez:mainfrom
Conversation
Wrote this in an afternoon so I could cross-compile from Linux, because I felt like it. The resulting SCGL.dll is untested at the time of commit, but it will compile if you have mingw installed. At this time, you must explicitly specify the compiler if you're not using vscode (or codium) with the CMake extension, which detects toolchains automagically. Will look into CMake presets if I come back to this.
…ug builds and with GCC/Clang
|
Thank you for this. It builds fine but when I try to run SC4 I get the following error: I have the libEGL1 package installed, so it's not because the libEGL package is missing. Did I build it wrong? |
@Castor215 probably not. I actually didn't personally test this but pulling in libgcc means it needs to be statically linked. As for the libEGL part, what's your distro and GPU? |
I am on Debian 13 (trixie) but using WINE from the winehq repository. installing the 'nvidia-egl-icd:i386` package solved this issue.
I built it passing I have also tried separately passing |
This is crude and required a minor code tweak to fix a case sensitivity issue.
I think you have to manually specify the toolchain (e.g. the compiler using CC and CXX environment variables or cmake cache) unless you're using the CMake extension on vscode or codium, and of course you'll need mingw.
I haven't tested the resulting binary, or the system itself on Windows for native compile.
This was done on a burst of energy in an afternoon so I can't promise that I'll return to it.