diff options
author | Brad King <brad.king@kitware.com> | 2015-02-17 15:09:13 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-02-17 15:09:13 (GMT) |
commit | 5c635fa62414c408d04046079a5c0dac43f7cce2 (patch) | |
tree | 6a7e7faf97d0fe5e152bd1501a5432c01c5a8c8a /Source | |
parent | 034f8e0bd9a2b8a319fead5042ee5782a0df03fd (diff) | |
parent | fa8b30ebb57da8ddc3e3616c4d212811abc19335 (diff) | |
download | CMake-5c635fa62414c408d04046079a5c0dac43f7cce2.zip CMake-5c635fa62414c408d04046079a5c0dac43f7cce2.tar.gz CMake-5c635fa62414c408d04046079a5c0dac43f7cce2.tar.bz2 |
Merge topic 'vs7-OutputDirectory'
fa8b30eb VS: Fix .vcproj and .vfproj file OutputDirectory generation
aa2ba121 VS: Use $(ConfigurationName) as CMAKE_CFG_INTDIR in VS 7, 8, 9
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.h | 3 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 16 |
2 files changed, 15 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 201a6a6..b591653 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -94,7 +94,8 @@ public: std::string& dir); ///! What is the configurations directory variable called? - virtual const char* GetCMakeCFGIntDir() const { return "$(OutDir)"; } + virtual const char* GetCMakeCFGIntDir() const + { return "$(ConfigurationName)"; } /** Return true if the target project file should have the option LinkLibraryDependencies and link to .sln dependencies. */ diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 914df5f..ed560aa 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -669,8 +669,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, static_cast<cmGlobalVisualStudio7Generator*>(this->GlobalGenerator); fout << "\t\t<Configuration\n" << "\t\t\tName=\"" << configName - << "|" << gg->GetPlatformName() << "\"\n" - << "\t\t\tOutputDirectory=\"" << configName << "\"\n"; + << "|" << gg->GetPlatformName() << "\"\n"; // This is an internal type to Visual Studio, it seems that: // 4 == static library // 2 == dll @@ -798,6 +797,16 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, std::string intermediateDir = this->GetTargetDirectory(target); intermediateDir += "/"; intermediateDir += configName; + + if (target.GetType() < cmTarget::UTILITY) + { + std::string const& outDir = + target.GetType() == cmTarget::OBJECT_LIBRARY? + intermediateDir : target.GetDirectory(configName); + fout << "\t\t\tOutputDirectory=\"" + << this->ConvertToXMLOutputPathSingle(outDir.c_str()) << "\"\n"; + } + fout << "\t\t\tIntermediateDirectory=\"" << this->ConvertToXMLOutputPath(intermediateDir.c_str()) << "\"\n" @@ -1441,7 +1450,8 @@ cmLocalVisualStudio7Generator // First search a configuration-specific subdirectory and then the // original directory. - fout << comma << this->ConvertToXMLOutputPath((dir+"/$(OutDir)").c_str()) + fout << comma + << this->ConvertToXMLOutputPath((dir+"/$(ConfigurationName)").c_str()) << "," << this->ConvertToXMLOutputPath(dir.c_str()); comma = ","; } |