X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fandroidtools.cpp;h=118926e1aa3e29dd277d77f138090c65305536b2;hb=2193df46d4e7721dbb99ce744fbc884c2447e1f9;hp=93b7bfac7a05d941f128ab55fcf05c088736e51d;hpb=4ee988cdd18d919b11355c21e5234c3f28f5d6a7;p=builder.git diff --git a/source/androidtools.cpp b/source/androidtools.cpp index 93b7bfa..118926e 100644 --- a/source/androidtools.cpp +++ b/source/androidtools.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -36,14 +36,16 @@ AndroidDevKit::AndroidDevKit(Builder &b, const string &type, const FS::Path &def builder(b) { string var = format("ANDROID_%s_ROOT", type); - if(const char *value = getenv(var.c_str())) - root = value; - else if(!default_path.empty() && FS::exists(default_path)) - root = default_path; - else + root = getenv(var); + if(root.empty()) { - builder.get_logger().log("problems", format("Android %s not found", type)); - return; + if(!default_path.empty() && FS::exists(default_path)) + root = default_path; + else + { + builder.get_logger().log("problems", format("Android %s not found", type)); + return; + } } FS::Path platforms_dir = root/"platforms";