summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-07 15:02:40 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-03-07 15:02:40 (GMT)
commit9fcc8ff455a81379b0eec58b4f763d7699916171 (patch)
tree38283595c225c9c100082f9085db6a69e2ce537d /Source
parente0751c4d25bba7364a361a55fe31d1567b64e51f (diff)
parent6122909c33bea1256867a40a09e0eafa569e8c8b (diff)
downloadCMake-9fcc8ff455a81379b0eec58b4f763d7699916171.zip
CMake-9fcc8ff455a81379b0eec58b4f763d7699916171.tar.gz
CMake-9fcc8ff455a81379b0eec58b4f763d7699916171.tar.bz2
Merge topic 'vs-vcxproj-ConfigurationType'
6122909c VS: Add option to set `ConfigurationType` of a .vcxproj file
Diffstat (limited to 'Source')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx78
1 files changed, 43 insertions, 35 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index a664442..61d7855 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -696,43 +696,51 @@ void cmVisualStudio10TargetGenerator::WriteProjectConfigurationValues()
i->c_str(),
1, " Label=\"Configuration\"", "\n");
std::string configType = "<ConfigurationType>";
- switch(this->GeneratorTarget->GetType())
- {
- case cmState::SHARED_LIBRARY:
- case cmState::MODULE_LIBRARY:
- configType += "DynamicLibrary";
- break;
- case cmState::OBJECT_LIBRARY:
- case cmState::STATIC_LIBRARY:
- configType += "StaticLibrary";
- break;
- case cmState::EXECUTABLE:
- if(this->NsightTegra &&
- !this->GeneratorTarget->GetPropertyAsBool("ANDROID_GUI"))
- {
- // Android executables are .so too.
+ if (const char* vsConfigurationType =
+ this->GeneratorTarget->GetProperty("VS_CONFIGURATION_TYPE"))
+ {
+ configType += cmVS10EscapeXML(vsConfigurationType);
+ }
+ else
+ {
+ switch(this->GeneratorTarget->GetType())
+ {
+ case cmState::SHARED_LIBRARY:
+ case cmState::MODULE_LIBRARY:
configType += "DynamicLibrary";
- }
- else
- {
- configType += "Application";
- }
- break;
- case cmState::UTILITY:
- case cmState::GLOBAL_TARGET:
- if(this->NsightTegra)
- {
- // Tegra-Android platform does not understand "Utility".
+ break;
+ case cmState::OBJECT_LIBRARY:
+ case cmState::STATIC_LIBRARY:
configType += "StaticLibrary";
- }
- else
- {
- configType += "Utility";
- }
- break;
- case cmState::UNKNOWN_LIBRARY:
- case cmState::INTERFACE_LIBRARY:
- break;
+ break;
+ case cmState::EXECUTABLE:
+ if(this->NsightTegra &&
+ !this->GeneratorTarget->GetPropertyAsBool("ANDROID_GUI"))
+ {
+ // Android executables are .so too.
+ configType += "DynamicLibrary";
+ }
+ else
+ {
+ configType += "Application";
+ }
+ break;
+ case cmState::UTILITY:
+ case cmState::GLOBAL_TARGET:
+ if(this->NsightTegra)
+ {
+ // Tegra-Android platform does not understand "Utility".
+ configType += "StaticLibrary";
+ }
+ else
+ {
+ configType += "Utility";
+ }
+ break;
+ case cmState::UNKNOWN_LIBRARY:
+ case cmState::INTERFACE_LIBRARY:
+ break;
+ }
}
configType += "</ConfigurationType>\n";
this->WriteString(configType.c_str(), 2);