- set_command((ndk.get_bin_dir()/command).str());
- build_info.incpath.insert(build_info.incpath.end(), system_path.begin(), system_path.end());
+ if(ndk.get_root_dir().empty())
+ problems.push_back("Android NDK not found");
+ else if(ndk.get_bin_dir().empty())
+ problems.push_back("Android NDK toolchain not found");
+ else
+ set_command((ndk.get_bin_dir()/command).str());
+
+ if(ndk.get_platform_sysroot().empty())
+ problems.push_back("Android platform not found");
+ else if(!ndk.get_common_sysroot().empty())
+ {
+ build_info.sysroot = ndk.get_common_sysroot();
+ /* The common sysroot has asm headers in arch directories and the
+ compiler doesn't pick them up automatically */
+ build_info.incpath.push_back(ndk.get_common_sysroot()/"usr/include"/architecture->get_cross_prefix());
+ }
+ else
+ build_info.sysroot = ndk.get_platform_sysroot();
+