From af8c7e76165daf80f757cb72486456a5ae74f1ab Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Mon, 14 Jul 2003 10:13:30 -0400 Subject: [PATCH] some updates --- Source/cmFLTKWrapUICommand.cxx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx index 6e0bdc900..28323d370 100644 --- a/Source/cmFLTKWrapUICommand.cxx +++ b/Source/cmFLTKWrapUICommand.cxx @@ -64,25 +64,22 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector const& args) cmSourceFile *curr = m_Makefile->GetSource(i->c_str()); // if we should use the source GUI // to generate .cxx and .h files - if (!curr && !curr->GetPropertyAsBool("WRAP_EXCLUDE")) + if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE")) { cmSourceFile header_file; - cmSourceFile source_file; std::string srcName = cmSystemTools::GetFilenameWithoutExtension(*i); const bool headerFileOnly = true; header_file.SetName(srcName.c_str(), outputDirectory.c_str(), "h",headerFileOnly); - source_file.SetName(srcName.c_str(), - outputDirectory.c_str(), "cxx",!headerFileOnly); std::string origname = cdir + "/" + *i; std::string hname = header_file.GetFullPath(); // add starting depends - source_file.GetDepends().push_back(hname); std::vector depends; 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 cxxargs; cxxargs.push_back("-c"); // instructs Fluid to run in command line @@ -93,7 +90,7 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector const& args) cxxargs.push_back(origname);// name of the GUI fluid file // Add command for generating the .h and .cxx files - m_Makefile->AddCustomCommandToOutput(cxxres, + m_Makefile->AddCustomCommandToOutput(cxxres.c_str(), fluid_exe.c_str(), cxxargs, 0, @@ -105,7 +102,9 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector const& args) 0, 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); } }