Merge topic 'vs6-rule-files'

0f24a66 VS 6: Create .rule file directory before file
This commit is contained in:
Brad King 2013-02-05 14:46:32 -05:00 committed by CMake Topic Stage
commit e6b72e8b87
1 changed files with 3 additions and 0 deletions

View File

@ -325,6 +325,9 @@ void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout,
if(!cmSystemTools::FileExists(source.c_str()))
{
cmSystemTools::ReplaceString(source, "$(IntDir)/", "");
// Make sure the path exists for the file
std::string path = cmSystemTools::GetFilenamePath(source);
cmSystemTools::MakeDirectory(path.c_str());
#if defined(_WIN32) || defined(__CYGWIN__)
std::ofstream sourceFout(source.c_str(),
std::ios::binary | std::ios::out