Core on Android compiles one more time - improvments in Android builder, code refactoring

git-svn-id: svn://ultimatepp.org/upp/trunk@10567 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
klugier 2016-12-24 14:18:27 +00:00
parent aae3c4a238
commit 61606fd866
11 changed files with 320 additions and 170 deletions

View file

@ -53,7 +53,7 @@ void AndroidModuleMakeFile::AddSourceFile(const String& path)
void AndroidModuleMakeFile::AddInclude(const String& includePath)
{
includes.Add(includePath);
includes.FindAdd(includePath);
}
void AndroidModuleMakeFile::AddCppFlag(const String& name, const String& value)
@ -93,23 +93,25 @@ void AndroidModuleMakeFile::AppendSourceFiles(String& makeFile) const
void AndroidModuleMakeFile::AppendIncludes(String& makeFile) const
{
AndroidMakeFile::AppendStringVector(makeFile, includes, "LOCAL_C_INCLUDES");
AndroidMakeFile::AppendStringVector(makeFile, includes.GetKeys(), "LOCAL_C_INCLUDES");
}
void AndroidModuleMakeFile::AppendCppFlags(String& makeFile) const
{
if(!cppFlags.IsEmpty()) {
makeFile << "LOCAL_CPPFLAGS := ";
for(int i = 0; i < cppFlags.GetCount(); i++) {
String value = cppFlags[i];
makeFile << "-D" << cppFlags.GetKey(i);
if(!value.IsEmpty())
makeFile << "=" << value;
if(i + 1 < sourceFiles.GetCount())
makeFile << " ";
}
makeFile << "\n";
if(cppFlags.IsEmpty()) {
return;
}
makeFile << "LOCAL_CPPFLAGS := ";
for(int i = 0; i < cppFlags.GetCount(); i++) {
String value = cppFlags[i];
makeFile << "-D" << cppFlags.GetKey(i);
if(!value.IsEmpty())
makeFile << "=" << value;
if(i + 1 < sourceFiles.GetCount())
makeFile << " ";
}
makeFile << "\n";
}
void AndroidModuleMakeFile::AppendLdLibraries(String& makeFile) const