Generate java dependency files
This commit is contained in:
parent
d1d92f7678
commit
b35814d65e
@ -48,6 +48,15 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
|
|||||||
sourceListValue = def;
|
sourceListValue = def;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prepare java dependency file
|
||||||
|
std::string resultDirectory = "${VTK_JAVA_HOME}";
|
||||||
|
std::string res = m_Makefile->GetCurrentOutputDirectory();
|
||||||
|
std::string depFileName = res + "/JavaDependencies.cmake";
|
||||||
|
ofstream depFile(depFileName.c_str());
|
||||||
|
depFile << "# This file is automatically generated by CMake VTK_WRAP_JAVA"
|
||||||
|
<< std::endl << std::endl;
|
||||||
|
depFile << "SET(VTK_JAVA_DEPENDENCIES ${VTK_JAVA_DEPENDENCIES}" << std::endl;
|
||||||
|
|
||||||
// get the list of classes for this library
|
// get the list of classes for this library
|
||||||
for(std::vector<std::string>::const_iterator j = (args.begin() + 2);
|
for(std::vector<std::string>::const_iterator j = (args.begin() + 2);
|
||||||
j != args.end(); ++j)
|
j != args.end(); ++j)
|
||||||
@ -77,8 +86,15 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
|
|||||||
sourceListValue += ";";
|
sourceListValue += ";";
|
||||||
}
|
}
|
||||||
sourceListValue += newName + ".cxx";
|
sourceListValue += newName + ".cxx";
|
||||||
|
|
||||||
|
// Write file to java dependency file
|
||||||
|
std::string jafaFile = resultDirectory + "/" + srcName + ".java";
|
||||||
|
depFile << " " << jafaFile << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Finalize java dependency file
|
||||||
|
depFile << ")" << std::endl;
|
||||||
|
|
||||||
m_Makefile->AddDefinition(m_SourceList.c_str(), sourceListValue.c_str());
|
m_Makefile->AddDefinition(m_SourceList.c_str(), sourceListValue.c_str());
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user