summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorCarsten Rudolph <18394207+crud89@users.noreply.github.com>2022-01-22 09:29:46 (GMT)
committerBrad King <brad.king@kitware.com>2022-01-22 11:35:41 (GMT)
commitb2f8f0bb87b3b49a39d1db4333bffc5405166245 (patch)
treebbead21bb96a02373d752526f275eb503bd1a803 /Source/cmGeneratorTarget.cxx
parent193b8fca52b5665387dbc7f3199981d9e6cd4b79 (diff)
downloadCMake-b2f8f0bb87b3b49a39d1db4333bffc5405166245.zip
CMake-b2f8f0bb87b3b49a39d1db4333bffc5405166245.tar.gz
CMake-b2f8f0bb87b3b49a39d1db4333bffc5405166245.tar.bz2
cmGlobalVisualStudio10Generator: Auto restore NuGet packages.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 421e136..45e3b64 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -8102,6 +8102,26 @@ cmLinkItem cmGeneratorTarget::ResolveLinkItem(BT<std::string> const& name,
return cmLinkItem(resolved.Target, false, bt);
}
+bool cmGeneratorTarget::HasPackageReferences() const
+{
+ return this->IsInBuildSystem() &&
+ !this->GetProperty("VS_PACKAGE_REFERENCES")->empty();
+}
+
+std::vector<std::string> cmGeneratorTarget::GetPackageReferences() const
+{
+ std::vector<std::string> packageReferences;
+
+ if (this->IsInBuildSystem()) {
+ if (cmValue vsPackageReferences =
+ this->GetProperty("VS_PACKAGE_REFERENCES")) {
+ cmExpandList(*vsPackageReferences, packageReferences);
+ }
+ }
+
+ return packageReferences;
+}
+
std::string cmGeneratorTarget::GetPDBDirectory(const std::string& config) const
{
if (OutputInfo const* info = this->GetOutputInfo(config)) {