diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-02-04 14:48:00 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-02-04 14:48:00 (GMT) |
commit | b35814d65e6856b3bfc880039709ea4f10b6fcbd (patch) | |
tree | 98b0b12c4dce15fea7e537e53dc50df7d7f1985d /Source/cmVTKWrapJavaCommand.cxx | |
parent | d1d92f7678abce187dcada134437c9df07ca713d (diff) | |
download | CMake-b35814d65e6856b3bfc880039709ea4f10b6fcbd.zip CMake-b35814d65e6856b3bfc880039709ea4f10b6fcbd.tar.gz CMake-b35814d65e6856b3bfc880039709ea4f10b6fcbd.tar.bz2 |
Generate java dependency files
Diffstat (limited to 'Source/cmVTKWrapJavaCommand.cxx')
-rw-r--r-- | Source/cmVTKWrapJavaCommand.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmVTKWrapJavaCommand.cxx b/Source/cmVTKWrapJavaCommand.cxx index 7f9ff20..c1ed5d2 100644 --- a/Source/cmVTKWrapJavaCommand.cxx +++ b/Source/cmVTKWrapJavaCommand.cxx @@ -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; |