summaryrefslogtreecommitdiffstats
path: root/Source/cmFLTKWrapUICommand.cxx
diff options
context:
space:
mode:
authorLuis Ibanez <luis.ibanez@kitware.com>2001-12-11 07:21:18 (GMT)
committerLuis Ibanez <luis.ibanez@kitware.com>2001-12-11 07:21:18 (GMT)
commitcdecad7a0559c353f336a54bd6332d1c16b9df22 (patch)
tree14133865d6990b457d7a2e3ec37a18465c628d68 /Source/cmFLTKWrapUICommand.cxx
parentbf7470be7c454c9e3ee874a89b720e16beb38e8a (diff)
downloadCMake-cdecad7a0559c353f336a54bd6332d1c16b9df22.zip
CMake-cdecad7a0559c353f336a54bd6332d1c16b9df22.tar.gz
CMake-cdecad7a0559c353f336a54bd6332d1c16b9df22.tar.bz2
FIX: The command was modified it uses now a target and a source list
composed of .fl files. The names of the generated .cxx files are added internally to the Sources list of the target.
Diffstat (limited to 'Source/cmFLTKWrapUICommand.cxx')
-rw-r--r--Source/cmFLTKWrapUICommand.cxx24
1 files changed, 8 insertions, 16 deletions
diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx
index c9b1587..af04381 100644
--- a/Source/cmFLTKWrapUICommand.cxx
+++ b/Source/cmFLTKWrapUICommand.cxx
@@ -77,9 +77,9 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
// what is the current source dir
std::string cdir = m_Makefile->GetCurrentDirectory();
- // keep the library name
- m_GUISourceList = args[0]; // Source List of the GUI source files
- m_GeneratedSourceList = args[1]; // Source List to insert the generated .cxx files
+ // get parameter for the command
+ m_Target = args[0]; // Target that will use the generated files
+ m_GUISourceList = args[1]; // Source List of the GUI source files
cmMakefile::SourceMap &GUISources = m_Makefile->GetSources();
@@ -122,17 +122,6 @@ bool cmFLTKWrapUICommand::InitialPass(std::vector<std::string> const& args)
m_GeneratedHeadersClasses.push_back(header_file);
m_GeneratedSourcesClasses.push_back(source_file);
- m_Makefile->AddSource(header_file, m_GeneratedSourceList.c_str());
- m_Makefile->AddSource(source_file, m_GeneratedSourceList.c_str());
-
- m_Makefile->AddSource(header_file, m_GeneratedSourceList.c_str());
- m_Makefile->AddSource(source_file, m_GeneratedSourceList.c_str());
-
- cmTarget cxxtarget;
- cxxtarget.SetType( cmTarget::GENERATED_CODE );
- cmTargets::value_type cxxpair( cxxname, cxxtarget );
- m_Makefile->GetTargets().insert( cxxpair );
-
}
}
@@ -177,10 +166,13 @@ void cmFLTKWrapUICommand::FinalPass()
outputs.push_back( cxxres );
outputs.push_back( hres );
- // Add command for generating the .h file
+ // Add command for generating the .h and .cxx files
m_Makefile->AddCustomCommand(m_WrapUserInterface[classNum].c_str(),
fluid_exe.c_str(), cxxargs, depends,
- outputs, cxxres.c_str() );
+ outputs, m_Target.c_str() );
+
+ m_Makefile->GetTargets()[m_Target].GetSourceFiles().push_back( m_GeneratedSourcesClasses[classNum] );
+
}
}