[Cmake-commits] [cmake-commits] king committed cmVisualStudio10TargetGenerator.cxx 1.23 1.24

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Oct 23 11:33:36 EDT 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv1972/Source

Modified Files:
	cmVisualStudio10TargetGenerator.cxx 
Log Message:
Always set OutputPath in VS 10 projects

The default $(OutDir)$(TargetName)$(TargetExt) for this value works in
most cases because we set the three properties.  However, if the target
property PREFIX contains a path component (not documented but happens to
work in other VS generators) we drop it from TargetName and do not put
it in OutDir either.  This commit corrects the resulting path by setting
the OutputPath property explicitly with the full path.

See issue #9768.


Index: cmVisualStudio10TargetGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmVisualStudio10TargetGenerator.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -C 2 -d -r1.23 -r1.24
*** cmVisualStudio10TargetGenerator.cxx	22 Oct 2009 14:21:35 -0000	1.23
--- cmVisualStudio10TargetGenerator.cxx	23 Oct 2009 15:33:27 -0000	1.24
***************
*** 1134,1144 ****
                                    config.c_str());
      }
!   std::string imLib = this->Target->GetDirectory(config.c_str(), true);
!   std::string dir = this->Target->GetDirectory(config.c_str(), true);
    dir += "/";
!   imLib += "/";
!   imLib += targetNameImport;
    std::string pdb = dir;
    pdb += targetNamePDB;
    linkOptions.AddFlag("ImportLibrary", imLib.c_str());
    linkOptions.AddFlag("ProgramDataBaseFileName", pdb.c_str());
--- 1134,1149 ----
                                    config.c_str());
      }
! 
!   std::string dir = this->Target->GetDirectory(config.c_str());
    dir += "/";
!   std::string out = dir;
!   out += targetNameFull;
    std::string pdb = dir;
    pdb += targetNamePDB;
+   std::string imLib = this->Target->GetDirectory(config.c_str(), true);
+   imLib += "/";
+   imLib += targetNameImport;
+ 
+   linkOptions.AddFlag("OutputFile", out.c_str());
    linkOptions.AddFlag("ImportLibrary", imLib.c_str());
    linkOptions.AddFlag("ProgramDataBaseFileName", pdb.c_str());



More information about the Cmake-commits mailing list