Improve behavior from HXML builds

This commit is contained in:
Joshua Granick
2016-09-28 11:21:49 -07:00
parent b498f9e2ab
commit ee00f53114
2 changed files with 25 additions and 0 deletions

1
extraParams.hxml Normal file
View File

@@ -0,0 +1 @@
--macro lime.Lib.extraParams()

View File

@@ -4,6 +4,11 @@ package lime;
import haxe.PosInfos;
import lime.utils.Log;
#if macro
import haxe.macro.Compiler;
import haxe.macro.Context;
#end
class Lib {
@@ -11,6 +16,25 @@ class Lib {
@:noCompletion private static var __sentWarnings = new Map<String, Bool> ();
#if macro
public static function extraParams ():Void {
if (!Context.defined ("tools")) {
if (!Context.defined ("flash") && (!Context.defined ("js") || Context.defined ("nodejs"))) {
Compiler.define ("lime-cffi");
Compiler.define ("native");
Compiler.define ("lime-curl");
}
}
}
#end
public static function notImplemented (api:String, ?posInfo:PosInfos):Void {
if (!__sentWarnings.exists (api)) {