diff options
author | Brad King <brad.king@kitware.com> | 2016-03-07 15:02:40 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-03-07 15:02:40 (GMT) |
commit | 9fcc8ff455a81379b0eec58b4f763d7699916171 (patch) | |
tree | 38283595c225c9c100082f9085db6a69e2ce537d /Source | |
parent | e0751c4d25bba7364a361a55fe31d1567b64e51f (diff) | |
parent | 6122909c33bea1256867a40a09e0eafa569e8c8b (diff) | |
download | CMake-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.cxx | 78 |
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); |