$ ./vcpkg.exe list curl:x64-windows 7.66.0 A library for transferring data with URLs curl[ssl]:x64-windows Default SSL backend curl[winssl]:x64-windows SSL support (Secure Channel / "WinSSL") jsoncpp:x64-windows 1.9.1 jsoncpp is an implementation of a JSON reader an... openssl-windows:x64-windows 1.0.2s-1 OpenSSL is an open source project that provides ... openssl:x64-windows 1 OpenSSL is an open source project that provides ... zlib:x64-windows 1.2.11-5 A compression library
$ ./vcpkg.exe integrate install Applied user-wide integration for this vcpkg root.
All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available.
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=D:/vcpkg/scripts/buildsystems/vcpkg.cmake"
当出现 “Applied user-wide integration for this vcpkg root.” 字样的时候,说明已经集成成功。这时候可以在任意的工程中使用安装好的第三方库。
移除全局集成:
./vcpkg.exe integrate remove
集成到工程
“集成到工程”需要利用 Visual Studio 中的 nuget 插件来实现。
生成配置
执行命令
$ ./vcpkg.exe integrate project Created nupkg: D:\vcpkg\scripts\buildsystems\vcpkg.D.vcpkg.1.0.0.nupkg
With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste: Install-Package vcpkg.D.vcpkg -Source "D:\vcpkg\scripts\buildsystems"