文章目录
- 前言
- 寻找版本
- 安装
- 后话
前言
windows一直用着vcpkg作为C++跨平台开发的包管理,有些依赖要指定版本库,vcpkg目前最新的openssl版本是3.1.0,我想安装其他版本为例,开始本教程
寻找版本
以openssl
举例,在vcpkg目录中有versions文件夹存在每个包的历史版本, openssl
是o为开头,找到o-
文件夹即可。E:\vcpkg\versions\o-\openssl.json
{
"versions": [
{
"git-tree": "b123beef6759b490ff8679b5cd4db0f721a2808a",
"version": "3.1.0",
"port-version": 1
},
{
"git-tree": "179a1ad3f5a5bbcb77f2e00688e4c467f03d4311",
"version": "3.1.0",
"port-version": 0
},
{
"git-tree": "3fbd85566107cc3a76ed800844569f1a7503f9d6",
"version": "3.0.8",
"port-version": 2
},
{
"git-tree": "17ce011827417025d6a29924ace0a474f1689c65",
"version": "3.0.8",
"port-version": 1
},
{
"git-tree": "9cd36489fc65db87c4cd94ac606abd05c1db8f2d",
"version": "3.0.8",
"port-version": 0
},
{
"git-tree": "71beae5ba81d9198d1ca12024325630b6ad81446",
"version": "3.0.7",
"port-version": 2
},
{
"git-tree": "a2607b45f60f01df2d549c97a51f5aa558ce97e9",
"version": "3.0.7",
"port-version": 1
},
{
"git-tree": "09701bf7506bd0d161bf671eff1c7f5b3d73e3a9",
"version": "3.0.7",
"port-version": 0
},
{
"git-tree": "067a790dfd1559e77d5a199ccbe982322882d667",
"version": "3.0.5",
"port-version": 5
},
{
"git-tree": "557ff31f9a64f01cd0d98dd44793ce3c7fd32893",
"version": "3.0.5",
"port-version": 4
},
{
"git-tree": "d4fd408544a2a6635ce994badc226aa945c8f78a",
"version": "3.0.5",
"port-version": 3
},
{
"git-tree": "1172be56343ba751b0fe10a0fbb6acedc7871e65",
"version": "3.0.5",
"port-version": 2
},
{
"git-tree": "3b7cc4dec346a7593959636aa8cc266240d92b7f",
"version": "3.0.5",
"port-version": 1
},
{
"git-tree": "6f3d4db3ea7bcbac9c79e8beb24c0a33c4da3e96",
"version": "3.0.5",
"port-version": 0
},
{
"git-tree": "b300461cf187df328c5d2269448840306f64a4e1",
"version": "3.0.4",
"port-version": 0
},
{
"git-tree": "cdd8b7c5c9ebba05598bc90a58f224f13cf0b611",
"version": "3.0.3",
"port-version": 2
},
{
"git-tree": "1ac5c972c2c6c9af050334b2f7a41de1253c6a5e",
"version": "3.0.3",
"port-version": 1
},
{
"git-tree": "973408910bc03c5a350f502080548a0d1ac68352",
"version": "3.0.3",
"port-version": 0
},
{
"git-tree": "f521f59b704e7bebbddd28929f61f3911b8c7cb4",
"version": "3.0.2",
"port-version": 3
},
{
"git-tree": "66e7ff434d21a4fc00cab9bbe6167db295ffefd3",
"version": "3.0.2",
"port-version": 2
},
{
"git-tree": "3505d3717ae864160fdb273eb2ec9d614eb6711e",
"version": "3.0.2",
"port-version": 1
},
{
"git-tree": "2ba2e59ee4f32c11e30aeccc0ecabc09b69c5d22",
"version": "3.0.2",
"port-version": 0
},
{
"git-tree": "06b9e0464af9c7c73227ba9f0fa93c77ef62496e",
"version-string": "1.1.1n",
"port-version": 1
},
{
"git-tree": "7e4d802e3bde4154c227c0dd1da75c719be9f07a",
"version-string": "1.1.1n",
"port-version": 0
},
{
"git-tree": "29c9d32a703896143a51c55f0b7ae4298684afd6",
"version-string": "1.1.1m",
"port-version": 2
},
{
"git-tree": "9b8e2ac096b1cd8782137a853c5fc76e07c2af9a",
"version-string": "1.1.1m",
"port-version": 1
},
{
"git-tree": "1dbcaacad14ed0761323aa12c13e917270153594",
"version-string": "1.1.1m",
"port-version": 0
},
{
"git-tree": "d25384246619019a1e44f018546cdfcaf1800174",
"version-string": "1.1.1l",
"port-version": 4
},
{
"git-tree": "83369bdefab234d8570ac2c0f3b616b0c4ab6cdf",
"version-string": "1.1.1l",
"port-version": 3
},
{
"git-tree": "d5310e60291032390ab8c893794f6044a7b9ae04",
"version-string": "1.1.1l",
"port-version": 2
},
{
"git-tree": "6d19a647704efae9398b178a0012140c1f1ee8b8",
"version-string": "1.1.1l",
"port-version": 1
},
{
"git-tree": "1916410d0a836cb70be2341fa3ec3cce74d25267",
"version-string": "1.1.1l",
"port-version": 0
},
{
"git-tree": "80b86b6b857d1b7bbb2c24cfcded13c28a4c3e81",
"version-string": "1.1.1k",
"port-version": 8
},
{
"git-tree": "affa6f8de25994a485d4310cb56ddbc0df9ac705",
"version-string": "1.1.1k",
"port-version": 7
},
{
"git-tree": "b96689b1d7a8ec6f50f40f4e2a6e36d199dc69a3",
"version-string": "1.1.1k",
"port-version": 6
},
{
"git-tree": "9cbfcf1a35e62330f5ebddca9d0f1ea493172ef7",
"version-string": "1.1.1k",
"port-version": 5
},
{
"git-tree": "029caa3289fc2b99107efaf987c23fd65f5eac97",
"version-string": "1.1.1k",
"port-version": 4
},
{
"git-tree": "9f4e7983d2a78b8e865d0444d90ef19ce3a9636c",
"version-string": "1.1.1k",
"port-version": 3
},
{
"git-tree": "dcaa59e72471884bf333486e49be386dd4a3da4f",
"version-string": "1.1.1k",
"port-version": 2
},
{
"git-tree": "24a9f866c10144f3dcce1b8972d43170cfad3201",
"version-string": "1.1.1k",
"port-version": 1
},
{
"git-tree": "dc279487c79f2b009333d7888799f3f9f83d8765",
"version-string": "1.1.1k",
"port-version": 0
},
{
"git-tree": "47f6dd2398634984759b609529bf35482957da54",
"version-string": "1.1.1j",
"port-version": 2
},
{
"git-tree": "2695b5d292f012836d962b22293d4dc081f75bff",
"version-string": "1.1.1j",
"port-version": 1
},
{
"git-tree": "009a7ee95741b939859c77b8e1ddd6c146ffe54e",
"version-string": "1.1.1j",
"port-version": 0
},
{
"git-tree": "30228fb5d272c8554937ac94b77fb971249c7c8a",
"version-string": "1.1.1i",
"port-version": 0
},
{
"git-tree": "a40ca65d6233b78873ab046be9312cc119f2a3b5",
"version-string": "1.1.1h",
"port-version": 5
},
{
"git-tree": "bd308eddff03351b29f403399e053e130581076a",
"version-string": "1.1.1h",
"port-version": 4
},
{
"git-tree": "22aba6aaaafcea524467c9b42780cbc271c1946c",
"version-string": "1.1.1h",
"port-version": 3
},
{
"git-tree": "db43863b6d477af0975455eea302f2f3981b7579",
"version-string": "1.1.1h",
"port-version": 2
},
{
"git-tree": "3d5b8bfd0984b72b432b3d2fb4447dd306e41d0a",
"version-string": "1.1.1h",
"port-version": 1
},
{
"git-tree": "10b21b67d6f259baa92845ba0ba06ebb480fe0f7",
"version-string": "1.1.1g",
"port-version": 1
},
{
"git-tree": "e96ecf6eebbc0c8356771548127c077e3e7bc676",
"version-string": "1.1.1g",
"port-version": 0
},
{
"git-tree": "a54c371df1a58c492721227b808bef69d4c0b6bd",
"version-string": "1.1.1d",
"port-version": 0
},
{
"git-tree": "0848995115a67c1818f5f9f2b667083d74dda046",
"version-string": "1",
"port-version": 0
},
{
"git-tree": "0a8165857ba19bdc061ef32acd6b7bad442480ed",
"version-string": "0",
"port-version": 0
},
{
"git-tree": "39d1773390a9817dd776d1d90e809d873437daa7",
"version-string": "1.0.2o-3",
"port-version": 0
},
{
"git-tree": "86a392547f55fe99da0105cfdb2ce012e0fa5f94",
"version-string": "1.0.2o-2",
"port-version": 0
},
{
"git-tree": "0ae9343f2814cfcfdef9445990d7b0c90495db52",
"version-string": "1.0.2o-1",
"port-version": 0
},
{
"git-tree": "74c8e8bdb3ecafc4d95aabbd076dfbb41db0a366",
"version-string": "1.0.2o",
"port-version": 0
},
{
"git-tree": "b0c5618831af164aab62f9b446b225fbf2b33b5e",
"version-string": "1.0.2n-3",
"port-version": 0
},
{
"git-tree": "f1cb0e39d975d255b9dfa2e55802cab0b9fc8355",
"version-string": "1.0.2n-2",
"port-version": 0
},
{
"git-tree": "cd538938214a1f0865641dfbcc9700182e1e5bd9",
"version-string": "1.0.2n-1",
"port-version": 0
},
{
"git-tree": "096e9e1bda009fd51e1b62a6c4b0f0808f22ca02",
"version-string": "1.0.2n",
"port-version": 0
},
{
"git-tree": "ae1fc122ee308f89f77bf72f6156ea48ad903e79",
"version-string": "1.0.2m",
"port-version": 0
},
{
"git-tree": "799259eabc46bde9958f9d285e4e3695836dec4d",
"version-string": "1.0.2l-3",
"port-version": 0
},
{
"git-tree": "06e68e4988301123770548bbe51a3f2a61993d0f",
"version-string": "1.0.2l-2",
"port-version": 0
},
{
"git-tree": "71c0ea9b022834e916b553b9239cf9e8df4af53b",
"version-string": "1.0.2l-1",
"port-version": 0
},
{
"git-tree": "4bbe7d4ddd39dbaa01b0d1920fa1cbf40e6eea4f",
"version-string": "1.0.21-1",
"port-version": 0
},
{
"git-tree": "c09f7eeae92108f42f6a7b8f887ee48152478697",
"version-string": "1.0.2k-5",
"port-version": 0
},
{
"git-tree": "91a923bc001d2dd39c52ed8ad976da371d47856a",
"version-string": "1.0.2k-4",
"port-version": 0
},
{
"git-tree": "fad4170dd59ac0c0690fee44ccae3b8f6a8e67c5",
"version-string": "1.0.2k-3",
"port-version": 0
},
{
"git-tree": "d78f2dceb034c24a9f19f48dda80181fc6500a3a",
"version-string": "1.0.2k-2",
"port-version": 0
},
{
"git-tree": "f8f125d46bd3e1a3680f33d0d7c7fcf59870efaa",
"version-string": "1.0.2k-1",
"port-version": 0
},
{
"git-tree": "53caaba6ea0df814d3c90589ca9d93a327adaac5",
"version-string": "1.0.2j-2",
"port-version": 0
},
{
"git-tree": "799207c0101ea8fb8e97b59c1855b1cae3148bd4",
"version-string": "1.0.2j-1",
"port-version": 0
},
{
"git-tree": "f18f7a91cacba1703f571e5c0a06c0f6b0d2a13f",
"version-string": "1.0.2j",
"port-version": 0
},
{
"git-tree": "c6ad91dbdec35b4d6cb404f39a5a2af454d2ea4d",
"version-string": "1.0.2h-1",
"port-version": 0
},
{
"git-tree": "818861b2d2b76893b113cdfef7c2bd54fae75272",
"version-string": "1.0.2j",
"port-version": 0
},
{
"git-tree": "12fd1375cd5c644b9eccc11415eff7e056f58d58",
"version-string": "1.0.2h-1",
"port-version": 0
},
{
"git-tree": "3e5163bcf41573dd2bc14130db52e77599f4131b",
"version-string": "1.0.2h",
"port-version": 0
}
]
}
这里记录着每个版本的git-tree, 找到自己想要的版本即可
安装
根据openssl.json
,安装openssl_1.1.1n
版本举例
在vcpkg根目录下,新建一个vcpkg.json
文件, 内容:
{
"dependencies": [
{
"name": "openssl"
}
],
"overrides": [
{
"name": "openssl",
"version-string": "1.1.1n#1"
}
]
}
注意区分"version"
和 "version-string"
保存之后,用cmd/ps 执行命令
vcpkg x-update-baseline --add-initial-baseline
vcpkg install
PS E:\vcpkg> vcpkg x-update-baseline --add-initial-baseline
updated registry 'https://github.com/microsoft/vcpkg': baseline '' -> '657bfe23f401f234d2bea75c36f79777ad944d21'
PS E:\vcpkg> vcpkg install
Detecting compiler hash for triplet x64-windows...
-- Automatically setting HTTP(S)_PROXY environment variables to "127.0.0.1:7890".
A suitable version of powershell-core was not found (required v7.2.8) Downloading portable powershell-core 7.2.8...
Downloading powershell-core...
https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/PowerShell-7.2.8-win-x86.zip->E:\vcpkg\downloads\PowerShell-7.2.8-win-x86.zip
Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.2.8/PowerShell-7.2.8-win-x86.zip
Extracting powershell-core...
The following packages will be removed:
vcpkg-cmake-get-vars:x64-windows
The following packages will be rebuilt:
* vcpkg-cmake[core]:x64-windows -> 2022-12-22 -- E:\vcpkg\buildtrees\versioning_\versions\vcpkg-cmake\1913f86defd2140d0a6751be2d51952e4090efa4
* vcpkg-cmake-config[core]:x64-windows -> 2022-02-06#1 -- E:\vcpkg\buildtrees\versioning_\versions\vcpkg-cmake-config\8d54cc4f487d51b655abec5f9c9c3f86ca83311f
The following packages will be built and installed:
openssl[core]:x64-windows -> 1.1.1n#1 -- E:\vcpkg\buildtrees\versioning_\versions\openssl\06b9e0464af9c7c73227ba9f0fa93c77ef62496e
Additional packages (*) will be modified to complete this operation.
Removing 1/6 vcpkg-cmake-get-vars:x64-windows
Elapsed time to handle vcpkg-cmake-get-vars:x64-windows: 1.54 ms
Removing 2/6 vcpkg-cmake-config:x64-windows
Elapsed time to handle vcpkg-cmake-config:x64-windows: 1.33 ms
Removing 3/6 vcpkg-cmake:x64-windows
Elapsed time to handle vcpkg-cmake:x64-windows: 1.56 ms
Restored 0 package(s) from C:\Users\NueXini\AppData\Local\vcpkg\archives in 197 us. Use --debug to see more details.
Installing 4/6 vcpkg-cmake-config:x64-windows...
Building vcpkg-cmake-config[core]:x64-windows...
-- Installing port from location: E:\vcpkg\buildtrees\versioning_\versions\vcpkg-cmake-config\8d54cc4f487d51b655abec5f9c9c3f86ca83311f
-- Installing: E:/vcpkg/packages/vcpkg-cmake-config_x64-windows/share/vcpkg-cmake-config/vcpkg_cmake_config_fixup.cmake
-- Installing: E:/vcpkg/packages/vcpkg-cmake-config_x64-windows/share/vcpkg-cmake-config/vcpkg-port-config.cmake
-- Installing: E:/vcpkg/packages/vcpkg-cmake-config_x64-windows/share/vcpkg-cmake-config/copyright
-- Performing post-build validation
A suitable version of 7zip was not found (required v21.7.0) Downloading portable 7zip 21.7.0...
Downloading 7zip...
https://www.7-zip.org/a/7z2107-extra.7z->E:\vcpkg\downloads\7z2107-extra.7z
Downloading https://www.7-zip.org/a/7z2107-extra.7z
Extracting 7zip...
Stored binary cache: "C:\Users\NueXini\AppData\Local\vcpkg\archives\3b\3b0e3878ddaad3fab84e48119c72c051272a3a80472873837df6f49158146fb8.zip"
Elapsed time to handle vcpkg-cmake-config:x64-windows: 3 s
Installing 5/6 vcpkg-cmake:x64-windows...
Building vcpkg-cmake[core]:x64-windows...
-- Installing port from location: E:\vcpkg\buildtrees\versioning_\versions\vcpkg-cmake\1913f86defd2140d0a6751be2d51952e4090efa4
-- Installing: E:/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake
-- Installing: E:/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake
-- Installing: E:/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake
-- Installing: E:/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/vcpkg-port-config.cmake
-- Installing: E:/vcpkg/packages/vcpkg-cmake_x64-windows/share/vcpkg-cmake/copyright
-- Performing post-build validation
Stored binary cache: "C:\Users\NueXini\AppData\Local\vcpkg\archives\79\799c0cb17da3b0549e9798b252a0788c93bcb758cdaaa8a81c0d09e94c12365b.zip"
Elapsed time to handle vcpkg-cmake:x64-windows: 64 ms
Installing 6/6 openssl:x64-windows...
Building openssl[core]:x64-windows...
-- Installing port from location: E:\vcpkg\buildtrees\versioning_\versions\openssl\06b9e0464af9c7c73227ba9f0fa93c77ef62496e
-- Downloading https://www.openssl.org/source/openssl-1.1.1n.tar.gz;https://www.openssl.org/source/old/1.1.1/openssl-1.1.1n.tar.gz -> openssl-1.1.1n.tar.gz...
-- Downloading https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip -> strawberry-perl-5.32.1.1-32bit.zip...
-- Extracting source E:/vcpkg/downloads/openssl-1.1.1n.tar.gz
-- Using source at E:/vcpkg/buildtrees/openssl/src/openssl-1-8a70f997ec.clean
-- Downloading https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/win64/nasm-2.16.01-win64.zip -> nasm-2.16.01-win64.zip...
-- Downloading https://download.qt.io/official_releases/jom/jom_1_1_3.zip;https://mirrors.ocf.berkeley.edu/qt/official_releases/jom/jom_1_1_3.zip -> jom_1_1_3.zip...
-- Copying openssl release source files...
-- Copying openssl release source files... done
-- Configure x64-windows-rel
-- Configure x64-windows-rel done
-- Build x64-windows-rel
-- Build x64-windows-rel done
-- Copying openssl debug source files...
-- Copying openssl debug source files... done
-- Configure x64-windows-dbg
-- Configure x64-windows-dbg done
-- Build x64-windows-dbg
-- Build x64-windows-dbg done
CMake Warning at scripts/cmake/vcpkg_copy_pdbs.cmake:44 (message):
Could not find a matching pdb file for:
E:/vcpkg/packages/openssl_x64-windows/bin/libcrypto-1_1-x64.dll
E:/vcpkg/packages/openssl_x64-windows/bin/libssl-1_1-x64.dll
E:/vcpkg/packages/openssl_x64-windows/debug/bin/libcrypto-1_1-x64.dll
E:/vcpkg/packages/openssl_x64-windows/debug/bin/libssl-1_1-x64.dll
Call Stack (most recent call first):
buildtrees/versioning_/versions/openssl/06b9e0464af9c7c73227ba9f0fa93c77ef62496e/windows/portfile.cmake:170 (vcpkg_copy_pdbs)
buildtrees/versioning_/versions/openssl/06b9e0464af9c7c73227ba9f0fa93c77ef62496e/portfile.cmake:21 (include)
scripts/ports.cmake:147 (include)
-- Installing: E:/vcpkg/packages/openssl_x64-windows/share/openssl/copyright
-- Fixing pkgconfig file: E:/vcpkg/packages/openssl_x64-windows/lib/pkgconfig/libcrypto.pc
-- Fixing pkgconfig file: E:/vcpkg/packages/openssl_x64-windows/lib/pkgconfig/libssl.pc
-- Fixing pkgconfig file: E:/vcpkg/packages/openssl_x64-windows/lib/pkgconfig/openssl.pc
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst -> msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst...
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst -> msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst...
-- Using msys root at E:/vcpkg/downloads/tools/msys2/9a1ec3f33446b195
-- Fixing pkgconfig file: E:/vcpkg/packages/openssl_x64-windows/debug/lib/pkgconfig/libcrypto.pc
-- Fixing pkgconfig file: E:/vcpkg/packages/openssl_x64-windows/debug/lib/pkgconfig/libssl.pc
-- Fixing pkgconfig file: E:/vcpkg/packages/openssl_x64-windows/debug/lib/pkgconfig/openssl.pc
-- Installing: E:/vcpkg/packages/openssl_x64-windows/share/openssl/usage
-- Performing post-build validation
Stored binary cache: "C:\Users\NueXini\AppData\Local\vcpkg\archives\1e\1ef87eac894fe4faf40193e5d6a7efa99d69f33786ff60f961c4ac86b77387b3.zip"
Elapsed time to handle openssl:x64-windows: 3.2 min
Total install time: 3.2 min
The package openssl is compatible with built-in CMake targets:
find_package(OpenSSL REQUIRED)
target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto)
以上,就完成了 openssl的1.1.1n版本的安装, 安装在根目录下的vcpkg_installed
, 安装完成后如果想正常使用的话可以把根目录下新建的vcpkg.json
删掉
后话
更多玩法可以去参考文档
- https://learn.microsoft.com/zh-cn/vcpkg/examples/packaging-zipfiles
- https://learn.microsoft.com/zh-cn/vcpkg/users/manifests
- https://blog.csdn.net/lhkjm/article/details/127596110
- https://blog.csdn.net/mmxida/article/details/114043319
enjoy ~