-#include <cstdlib>
+#include <msp/core/environ.h>
#include <msp/fs/dir.h>
#include <msp/fs/stat.h>
#include <msp/strings/format.h>
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";