diff options
author | Florian Schweiger <husker@dzdm.de> | 2022-04-08 11:01:57 (GMT) |
---|---|---|
committer | Florian Schweiger <husker@dzdm.de> | 2022-04-12 13:35:17 (GMT) |
commit | d89af11f89fe1a76e3c48e3320a541c58b794c72 (patch) | |
tree | 30f41de30f97d4ca3c3a5bbb51bf5fe8a54e1e63 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 359d7c19e522465b7ceadcfc69a25ffc799d344f (diff) | |
download | CMake-d89af11f89fe1a76e3c48e3320a541c58b794c72.zip CMake-d89af11f89fe1a76e3c48e3320a541c58b794c72.tar.gz CMake-d89af11f89fe1a76e3c48e3320a541c58b794c72.tar.bz2 |
VS: Add StartupObject property for managed .NET projects
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 276eccf..cf0cb17 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -664,6 +664,14 @@ void cmVisualStudio10TargetGenerator::WriteClassicMsBuildProjectFile( } } + cmValue startupObject = + this->GeneratorTarget->GetProperty("VS_DOTNET_STARTUP_OBJECT"); + + if (startupObject && this->Managed) { + Elem e1(e0, "PropertyGroup"); + e1.Element("StartupObject", *startupObject); + } + switch (this->ProjectType) { case VsProjectType::vcxproj: { std::string const& props = @@ -927,6 +935,12 @@ void cmVisualStudio10TargetGenerator::WriteSdkStyleProjectFile( break; } e1.Element("OutputType", outputType); + + cmValue startupObject = + this->GeneratorTarget->GetProperty("VS_DOTNET_STARTUP_OBJECT"); + if (startupObject) { + e1.Element("StartupObject", *startupObject); + } } for (const std::string& config : this->Configurations) { |