some updates

This commit is contained in:
Ken Martin 2003-07-14 10:13:30 -04:00
parent 24f4c279d9
commit af8c7e7616
1 changed files with 8 additions and 9 deletions

View File

@ -64,25 +64,22 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
cmSourceFile *curr = m_Makefile->GetSource(i->c_str()); cmSourceFile *curr = m_Makefile->GetSource(i->c_str());
// if we should use the source GUI // if we should use the source GUI
// to generate .cxx and .h files // to generate .cxx and .h files
if (!curr && !curr->GetPropertyAsBool("WRAP_EXCLUDE")) if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE"))
{ {
cmSourceFile header_file; cmSourceFile header_file;
cmSourceFile source_file;
std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*i); std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*i);
const bool headerFileOnly = true; const bool headerFileOnly = true;
header_file.SetName(srcName.c_str(), header_file.SetName(srcName.c_str(),
outputDirectory.c_str(), "h",headerFileOnly); outputDirectory.c_str(), "h",headerFileOnly);
source_file.SetName(srcName.c_str(),
outputDirectory.c_str(), "cxx",!headerFileOnly);
std::string origname = cdir + "/" + *i; std::string origname = cdir + "/" + *i;
std::string hname = header_file.GetFullPath(); std::string hname = header_file.GetFullPath();
// add starting depends // add starting depends
source_file.GetDepends().push_back(hname);
std::vector<std::string> depends; std::vector<std::string> depends;
depends.push_back(origname); depends.push_back(origname);
source_file.GetDepends().push_back(origname);
const char *cxxres = source_file.GetFullPath().c_str(); std::string cxxres = outputDirectory.c_str();
cxxres += "/" + srcName;
cxxres += ".cxx";
std::vector<std::string> cxxargs; std::vector<std::string> cxxargs;
cxxargs.push_back("-c"); // instructs Fluid to run in command line cxxargs.push_back("-c"); // instructs Fluid to run in command line
@ -93,7 +90,7 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
cxxargs.push_back(origname);// name of the GUI fluid file cxxargs.push_back(origname);// name of the GUI fluid file
// Add command for generating the .h and .cxx files // Add command for generating the .h and .cxx files
m_Makefile->AddCustomCommandToOutput(cxxres, m_Makefile->AddCustomCommandToOutput(cxxres.c_str(),
fluid_exe.c_str(), fluid_exe.c_str(),
cxxargs, cxxargs,
0, 0,
@ -105,7 +102,9 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
0, 0,
depends); depends);
cmSourceFile* sf = m_Makefile->AddSource(source_file); cmSourceFile *sf = m_Makefile->GetSource(cxxres.c_str());
sf->GetDepends().push_back(hname);
sf->GetDepends().push_back(origname);
m_GeneratedSourcesClasses.push_back(sf); m_GeneratedSourcesClasses.push_back(sf);
} }
} }