0
点赞
收藏
分享

微信扫一扫

Git Bash+vcpkg安装librealsense(Visual Studio环境开发)

颜娘娘的碎碎念 2022-03-15 阅读 58

Git Bash+vcpkg安装librealsense

一、vcpkg说明

vcpkg可以利用CMakeLists.txt安装c++开发的依赖库,使用Visual Studio打开vcpkg将自动读取里面安装的依赖库,那么无论在任何位置进行c++开发,都可以include已经用过vcpkg安装的依赖库。

二、安装过程

1.安装vcpkg

选择合适的文件夹,右键打开git bash

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh

使vcpkg适配VS

./vcpkg integrate install

2.安装librealsense

./vcpkg install realsense2

检查是否都安装完成

$ ./vcpkg 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:/MyGithub/vcpkg/scripts/buildsystems/vcpkg.cmake"

那么说明已经成功安装
检查一下已经安装的依赖项:

$ ./vcpkg list

将会出现如下依赖项列表

$ ./vcpkg list
realsense2:x86-windows                             2.50.0           Intel® RealSense™ SDK 2.0 is a cross-platform...
vcpkg-cmake-config:x64-windows                     2022-02-06
vcpkg-cmake:x64-windows                            2022-01-19
举报

相关推荐

0 条评论