vcpkg-deb is a lightweight integration tool that makes Debian system packages available as overlay ports in vcpkg. It enables vcpkg to recognize system-installed libraries, reducing redundant builds and improving integration with the system package manager.
This package installs:
/usr/local/bin/vcpkg-deb-sync.sh– A synchronization script that:- Reads mappings between Debian packages and vcpkg ports (
/etc/vcpkg-deb/mappings.jsonand/etc/vcpkg-deb/mappings.d/*.json). - Checks which system packages are currently installed.
- Creates or removes overlay ports in a target directory (
/opt/vcpkg-deb).
- Reads mappings between Debian packages and vcpkg ports (
/etc/apt/apt.conf.d/99-vcpkg-deb-sync– An APT hook that:- Runs the sync script automatically after every
apt install,apt remove, orapt upgrade. This ensures that your overlay registry is always in sync with the actual system packages available on your machine.
- Runs the sync script automatically after every
The sync script uses a set of JSON files describing mappings between Debian package names and vcpkg port names. These mappings allow it to determine which overlay ports to generate or delete, depending on what is currently installed.
Each overlay port contains:
- A minimal
vcpkg.jsonfile with the version and name. - A
portfile.cmakethat enables an empty placeholder (sufficient for satisfying dependencies when building with vcpkg).
The configuration directory is: /etc/vcpkg-deb/
/etc/vcpkg-deb/mappings.json– Primary mapping of Debian package names to vcpkg port names. Supports single values or arrays.
Example:
{
"libgtest-dev": "gtest",
"libboost-dev": ["boost-headers", "boost-iterator"]
}/etc/vcpkg-deb/mappings.d/*.json– Drop-in override files for additional or user-specific mappings.
You can place custom mappings here without modifying the system-provided mappings.json.
- Install the latest .deb package (e.g.
sudo dpkg -i vcpkg-deb_*_all.deb). - APT will automatically call
vcpkg-deb-sync.shafter package changes. - Use
/opt/vcpkg-debas a vcpkg overlay port path:
./vcpkg install your-lib --overlay-ports=/opt/vcpkg-debContributions are welcome!
- To add new mappings or suggest improvements, submit a pull request with changes to
mappings.json. - For bug reports or feature requests, please open an issue.
Please keep mappings general (i.e., useful across most Debian systems) and avoid adding highly project-specific configurations.
jq(used for parsing JSON)dpkg,apt(standard on Debian/Ubuntu)
- The script is read-only with respect to APT — it never installs or removes packages.
- It only writes into
/opt/vcpkg-deband reads from/etc/vcpkg-deb.