Filesystem registries 使用示例
发布日期:2022-04-22 13:47:14 浏览次数:8 分类:博客文章

本文共 2309 字,大约阅读时间需要 7 分钟。

创建注册表

参考   及以下文件结构来创建文件及文件夹,或者克隆官方示例库

 

filesystem/|-- ports/|-------- beicode/|--------------1.0.0/|---------------- portfile.cmake|---------------- vcpkg.json|--------- beison/|-------------- 1.0.0/|---------------- portfile.cmake|---------------- vcpkg.json|-------------- 1.0.1/|---------------- portfile.cmake|---------------- vcpkg.json|-- versions/| -------- baseline.json|--------- b-/|------------ beicode.json|------------ beison.json

 

使用注册表(manifest模式)

1. 创建Vcpkg-configuration.json 与vcpkg.json文件, 为了方便测试,可以把它放置到vcpkg根目录。实际使用时,请放置在您项目的工程项目与vcpkg.json同级目录下。

vcpkg-configuration.json文件:

{   "registries": [    {      "kind": "filesystem",      "baseline": "2021-04-08",      "path": "E:/vcpkg/vcpkgtest/registries/filesystem",      "packages": [ "beicode", "beison"]    }  ]}

vcpkg.json 文件:

{  "name": "test",  "version": "0",  "dependencies": [      "beicode",      "beison"   ]}

2. 安装使用,可以看到,它安装了注册表配置的库。

PS E:\vcpkg\clean\vcpkg> ./vcpkg install --triplet=x64-windowsDetecting compiler hash for triplet x64-windows...The following packages will be built and installed:    beicode[core]:x64-windows -> 1.0.0 -- E:/vcpkg/vcpkgtest/registries/filesystem\ports/beicode/1.0.0    beison[core]:x64-windows -> 1.0.1 -- E:/vcpkg/vcpkgtest/registries/filesystem\ports/beison/1.0.1Using cached binary package: C:\Users\phoebe\AppData\Local\vcpkg\archives\df\df818eb2474ab4e697ccbb6876ad31d41aa6a6008c938225856014ca82881e02.zipCould not locate cached archive: C:\Users\phoebe\AppData\Local\vcpkg\archives\66\66899286c8a08d5310336ed80de170053d24220cc4b0e464fb90521c58b094ed.zip...

 

使用注册表(经典模式)

1. 在vcpkg根目录下创建文件 vcpkg-configuration.json:

{   "registries": [    {      "kind": "filesystem",      "baseline": "2021-04-08",      "path": "E:/vcpkg/vcpkgtest/registries/filesystem",      "packages": [ "beicode", "beison"]    }  ]}

2. 安装beicode库。

PS E:\vcpkg\clean\vcpkg> ./vcpkg install beicodeComputing installation plan...The following packages will be built and installed:    beicode[core]:x86-windows -> 1.0.0 -- E:/vcpkg/vcpkgtest/registries/filesystem\ports/beicode/1.0.0Detecting compiler hash for triplet x86-windows...Could not locate cached archive: C:\Users\phoebe\AppData\Local\vcpkg\archives\af\af12a6c0126c79f715ae3940197c60e56a9845ecd605a07c041b0ffe61009e09.zipStarting package 1/1: beicode:x86-windows...

转载地址:https://www.cnblogs.com/vcpkg/p/15167906.html 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:FileUtils
下一篇:FileNotFoundException: /storage/emulated/0/Pictures/1582: open failed: EACCES (Permission denied)

发表评论

最新留言

逛到本站,mark一下
[***.202.152.39]2024年04月19日 11时24分12秒