Conan package recipe for liblava

March 17, 2023 · View on GitHub

liblava is a modern C++ and easy-to-use library for the Vulkan® API


Build and package

The following command will build liblava and publish the Conan package to the local system cache:

conan create . lavablock/stable

Config

It's possible that you need to configure Conan to use your preferred compiler and build settings. For example, to compile a release build with Clang you could use the following config:

include(default)

[settings]
compiler=clang
compiler.version=13
compiler.cppstd=20
build_type=Release

[env]
CC=clang-13
CXX=clang++

Save it as config_clang and create the package:

conan create . lavablock/stable -pr=config_clang

For more profile configuration options, refer to the Conan docs.


Usage

Add a dependency to liblava to your project's conanfile.txt:

[requires]
liblava/0.7.3@lavablock/stable

and install all requirements:

mkdir build
cd build
conan install ..

For more information, refer to Using packages.


Options

The following options can be configured:

OptionDescriptionDefault
fPICGenerate position-independent codeTrue
testBuild and install lava test binariesFalse
demoBuild and install lava demo binariesFalse

For information on how to set them, refer to Options.


New version

To add a new tagged lava version:

  1. Modify conanfile.py
    • update version field
    • if necessary, adapt to any changes to lava's build system
  2. Modify README.md
    • update version in Usage / requires section
  3. Push to latest branch
  4. Create new branch stable/%version% from latest