Populate environment with HXCPP config defines

This commit is contained in:
Joshua Granick
2014-11-18 07:50:56 -08:00
parent d49e563f73
commit 296991de4f

View File

@@ -1120,14 +1120,22 @@ class CommandLineTools {
var config = getHXCPPConfig ();
if (PlatformHelper.hostPlatform == Platform.WINDOWS) {
if (config != null) {
if (config != null && config.environment.exists ("JAVA_HOME")) {
for (define in config.defines.keys ()) {
Sys.putEnv ("JAVA_HOME", config.environment.get ("JAVA_HOME"));
if (define == define.toUpperCase ()) {
Sys.putEnv (define, config.defines.get (define));
}
}
}
if (PlatformHelper.hostPlatform == Platform.WINDOWS) {
if (Sys.getEnv ("JAVA_HOME") != null) {
var javaPath = PathHelper.combine (Sys.getEnv ("JAVA_HOME"), "bin");