diff options
author | Leonid Pospelov <pospelovlm@yandex.ru> | 2019-03-24 01:47:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-04-15 17:05:07 (GMT) |
commit | d145d72e708b7d742fb1324c056ba2c0254dda76 (patch) | |
tree | 005ebcd91ddd9ab8fff3198ec64e8b1a3e50f253 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 4bbd315097fb7161ab245ff0959472729cea2793 (diff) | |
download | CMake-d145d72e708b7d742fb1324c056ba2c0254dda76.zip CMake-d145d72e708b7d742fb1324c056ba2c0254dda76.tar.gz CMake-d145d72e708b7d742fb1324c056ba2c0254dda76.tar.bz2 |
VS: add target property VS_PROJECT_IMPORT_<propspath>
Fixes: #18998
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 5c9f25e..6ec47c2 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -662,6 +662,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteCustomCommands(e0); this->WriteAllSources(e0); this->WriteDotNetReferences(e0); + this->WriteImports(e0); this->WriteEmbeddedResourceGroup(e0); this->WriteXamlFilesGroup(e0); this->WriteWinRTReferences(e0); @@ -810,6 +811,24 @@ void cmVisualStudio10TargetGenerator::WriteDotNetReference( this->WriteDotNetReferenceCustomTags(e2, ref); } +void cmVisualStudio10TargetGenerator::WriteImports(Elem& e0) +{ + const char* imports = + this->GeneratorTarget->Target->GetProperty("VS_PROJECT_IMPORT"); + if (imports) { + std::vector<std::string> argsSplit; + cmSystemTools::ExpandListArgument(std::string(imports), argsSplit, false); + for (auto& path : argsSplit) { + if (!cmsys::SystemTools::FileIsFullPath(path)) { + path = this->Makefile->GetCurrentSourceDirectory() + "/" + path; + } + ConvertToWindowsSlash(path); + Elem e1(e0, "Import"); + e1.Attribute("Project", path); + } + } +} + void cmVisualStudio10TargetGenerator::WriteDotNetReferenceCustomTags( Elem& e2, std::string const& ref) { |