CMake的Nuget包 [英] Nuget package from CMake
问题描述
我正在使用CMake生成C#WPF项目.我遵循了Github上的CMakeLists.txt 示例.>
我的问题是:如何使用CMake向该项目添加Nuget包?
CMake 3.15及更高版本支持使用 文档显示了如何通过用分号分隔 对于较早的CMake版本,您可以在此处尝试建议的解决方法. I am generating an C# WPF project using CMake. I followed this CMakeLists.txt example from Github. My question is: How can add a Nuget package to this project using CMake? CMake 3.15 and above supports referencing Nuget packages with The documentation shows how you can add multiple Nuget packages by semicolon-delimiting For older CMake versions, you could try the proposed work-around suggested here. 这篇关于CMake的Nuget包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!;
软件包来添加多个 Nuget软件包.VS_PACKAGE_REFERENCES
. To add a Nuget package reference to a CMake target, use the package name and package version separated by an underscore _
. Here is an example for BouncyCastle
version 1.8.5:set_property(TARGET MyApplication
PROPERTY VS_PACKAGE_REFERENCES "BouncyCastle_1.8.5"
)
;
the packages.