VS集成vcpkg

VS集成vcpkg

下载vcpkg

  1. 下载vcpkg
git clone https://github.com/Microsoft/vcpkg.git
  1. 安装vcpgk,文件目录
.\bootstrap-vcpkg.bat

集成到vs2022中

# 集成到项目
vcpkg integrate project
vcpkg integrate install

在这里插入图片描述

PS C:\Users\Administrator> vcpkg integrate project
A suitable version of nuget was not found (required v6.2.1) Downloading portable nuget 6.2.1...
Downloading nuget...
https://dist.nuget.org/win-x86-commandline/v6.2.1/nuget.exe->D:\InstallSoftware\vcpkg\downloads\dbb8c13d-nuget.exe
Downloading https://dist.nuget.org/win-x86-commandline/v6.2.1/nuget.exe
Created nupkg: C:\Users\Administrator\vcpkg.D.InstallSoftware.vcpkg.1.0.0.nupkg
With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste:
 Install-Package "vcpkg.D.InstallSoftware.vcpkg" -Source "C:\Users\Administrator"
PS C:\Users\Administrator> vcpkg integrate install
Applied user-wide integration for this vcpkg root.
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=D:/InstallSoftware/vcpkg/scripts/buildsystems/vcpkg.cmake"

All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available.
PS C:\Users\Administrator>

添加安装的vcpkg包源

打开vs2022 工具 -> NuGet包管理器 -> 程序包管理器设置 -> 程序包源

https://blog.youkuaiyun.com/qq_36212935/article/details/130849333
Update url: https://raw.hellogithub.com/hosts
Star me: https://github.com/521xueweihan/GitHub520

在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值