- English (United States)
What is Package Management System?
“Package Management System” is management system such as install software and libraries, dependency resolution and etc..
Package Management System are widely used. For example, “APT” and “Yum” on Linux, “MacPorts” and “Homebrew” on Mac. Also, “NuGet” is used for managed languages such as C# on Windows.
What is Vcpkg?
Vcpkg is package management system based CMake that manages libraries for Visual C++. It is open source software developed in Microsoft repository of GitHub.
You can easily install various libraries by using Vcpkg. You can install and settings libraries using command based operations.
Vcpkg works with Visual C++ 2017 and Visual C++ 2015.
Vcpkg already support over 300 libraries such as Boost and OpenCV.
Please refer to ports directory or the
vcpkg search command for all supported libraries.
Vcpkg Support PCL
Point Cloud Library (PCL) is open source library for point cloud processing.
It is very useful library, but it is difficult to install many dependencies that have PCL.
Therefore, Vcpkg supported PCL for anyone can be able to easily install PCL.
You can easily install PCL with dependencies using following command.*1
# x86 dynamic link library vcpkg install pcl:x86-windows # x64 dynamic link library vcpkg install pcl:x64-windows # x86 static link library (Not Supported Yet) # vcpkg install pcl:x86-windows-static # x64 static link library (Not Supported Yet) # vcpkg install pcl:x64-windows-static
*1 Please execute “chcp 65001” command in advance in order to change the character code to UTF-8.
How to install Vcpkg
You can very easiy install Vcpkg to your system.
- Download and Unpack Vcpkg(e.g.
Please download Vcpkg from following link. Then, unpacking it.
It will be built automatically when you start the batch file (
If build completes successfully,
is generated in current directory.
It is useful to add Vcpkg path to environment variable "Path".
Please open PowerShell, and enter following command.
It is displayed as follows.
Basic commands frequently used in Vcpkg are as follows.
- vcpkg install <pkg>:[triplet] / vcpkg remove <pkg>:[triplet]
Install or Uninstall package.
At that time, the dependent libraries of package will also be installed or uninstalled.
If you don't specify target (triplet), Vcpkg install dynamic link library for x86.
If you want to use other target, You can specify triplet after package name.
The packages will be installed in
# x86 dynamic link library (default) vcpkg install boost:x86-windows # x86 static link library vcpkg install boost:x86-windows-static # x64 dynamic link library vcpkg install boost:x64-windows # x64 static link library vcpkg install boost:x64-windows-static
# x86 dynamic link library (default) vcpkg remove boost:x86-windows # x86 static link library vcpkg remove boost:x86-windows-static # x64 dynamic link library vcpkg remove boost:x64-windows # x64 static link library vcpkg remove boost:x64-windows-static
Shows package list that currently supported.
# List Supported Packages vcpkg search
Shows package list that currently installed.
# List Installed Packages vcpkg list
Set to able to be use packages that installed by Vcpkg in all Visual C++ projects.
You don’t need to settings project. You can develop program that use these libraries as it is.
vcpkg integrate install, UnSetting is
vcpkg integrate remove.
# Integrate vcpkg integrate install # UnIntegrate vcpkg integrate remove
How to Generate Own Projects that use Installed Packages?
You can use the libraries that installed by Vcpkg in your own project using one of the following ways.
- Use Vcpkg Integrate Command
You can develop program that use these libraries in all Visual C++ projects (all existing projects and all new projects) using after following command.
# Integrate Vcpkg Settings to All Visual C++ Projects vcpkg integrate install
Just add the following line to CMakeLists.txt.
find_package() will find the libraries that installed by Vcpkg.
# Setting to use Vcpkg set( CMAKE_TOOLCHAIN_FILE "C:/vcpkg/scripts/buildsystems/vcpkg.cmake" )
Vcpkg documentation is following link.
If you found bug, Please report to issues of Vcpkg repository.
Also, If you have questions or requests, Please post to same place.