[英]Nuget package from CMake
CMake 3.15 and above supports referencing Nuget packages with VS_PACKAGE_REFERENCES
. CMake 3.15 及更高版本支持使用
VS_PACKAGE_REFERENCES
引用 Nuget 包。 To add a Nuget package reference to a CMake target, use the package name and package version separated by an underscore _
.要将 Nuget 包引用添加到 CMake 目标,请使用由下划线
_
分隔的包名称和包版本。 Here is an example for BouncyCastle
version 1.8.5:以下是
BouncyCastle
版本 1.8.5 的示例:
set_property(TARGET MyApplication
PROPERTY VS_PACKAGE_REFERENCES "BouncyCastle_1.8.5"
)
The documentation shows how you can add multiple Nuget packages by semicolon-delimiting ;
该文档显示了如何通过分号分隔添加多个Nuget 包
;
the packages.包。
For older CMake versions, you could try the proposed work-around suggested here .对于较旧的 CMake 版本,您可以尝试此处建议的解决方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.