Vcpkg registry and port for liblava
liblava is a modern C++ and easy-to-use library for the Vulkan® API
In manifest mode, this repository can be used as a custom registry with versioning support.
Add this repository to vcpkg-configuration.json as a git registry:
{
"registries": [
{
"kind": "git",
"repository": "https://github.com/liblava/vcpkg-liblava",
"baseline": "!!!SEE BELOW!!!",
"packages": [ "liblava" ]
}
]
}
The baseline must be a git commit ID from this repository. To use the latest version, run:
git ls-remote https://github.com/liblava/vcpkg-liblava main
and copy the 40-character hash as the baseline string.
Add liblava to vcpkg.json as a dependency:
{
"name": "my-application",
"version": "1.0.0",
"dependencies": [
"liblava"
]
}
If you're using vcpkg in classic mode without manifests, clone this repo and pass a port overlay to vcpkg:
vcpkg install liblava --overlay-ports=/path/to/vcpkg-liblava/ports/liblava
Note: Installing lava this way is discouraged. This port builds dependencies as submodules rather than using existing vcpkg ports. These submodule libraries may conflict with existing ports installed globally.
When you run CMake for your project, pass -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
. This will make all installed libraries available to CMake.
If you're not using CMake or need advanced configuration, refer to Buildsystem Integration.
In your CMakeLists.txt, find and link to lava:
find_package(lava CONFIG REQUIRED)
target_link_libraries(main PRIVATE lava::engine)
The following optional features can be configured:
Option | Description |
---|---|
test | Build and install lava test binaries |
demo | Build and install lava demo binaries |
For information on how to set them, refer to Selecting library features.
To add a new tagged lava version:
- Modify ports/liblava/vcpkg.json
- update version field
- Modify ports/liblava/portfile.cmake
- update REF variable
- update SHA512 field - the easiest way is to try to install (see Option B above) and then copy the correct hash from the vcpkg error message (yes, really 👀)
- if necessary, adapt to any changes to lava's build system
- Commit changes
- this is necessary to get an up-to-date git-tree ID in the next step
- Modify versions/l-/liblava.json
- add a new version
- update version field
- set git-tree field to the output of
git rev-parse HEAD:ports/liblava
- add a new version
- Modify versions/baseline.json
- update baseline field
- Commit changes with --amend