Generate java dependency files

This commit is contained in:
Andy Cedilnik 2003-02-04 09:48:00 -05:00
parent d1d92f7678
commit b35814d65e
1 changed files with 16 additions and 0 deletions

View File

@ -48,6 +48,15 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
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
for(std::vector<std::string>::const_iterator j = (args.begin() + 2);
j != args.end(); ++j)
@ -77,8 +86,15 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector<std::string> const& argsIn)
sourceListValue += ";";
}
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());
return true;