Allow cross-compiling to Linux cpp from other operating systems

Similar to #1661, except targeting Linux instead of Windows

On macOS, need to install https://github.com/messense/homebrew-macos-cross-toolchains

On Windows, I think it may be possible to get Linux compilers with Cygwin, but I haven't tried
This commit is contained in:
Josh Tynjala
2024-04-26 10:03:20 -07:00
parent c26a73fc3c
commit 5381f96061
2 changed files with 60 additions and 2 deletions

View File

@@ -750,7 +750,12 @@ class HXProject extends Script
{
defines.set("native", "1");
if (target == Platform.WINDOWS && targetFlags.exists("mingw"))
if (target == Platform.LINUX && targetFlags.exists("cpp"))
{
defines.set("targetType", "cpp");
defines.set("cpp", "1");
}
else if (target == Platform.WINDOWS && targetFlags.exists("mingw"))
{
defines.set("targetType", "cpp");
defines.set("cpp", "1");