Skip to content

Use zcbor as a standalone package #535

@fun-works

Description

@fun-works

Currently, zcbor provides a CMake integration by generating a .cmake file for inclusion in user projects. However, it does not provide a standard CMakeLists.txt or CMake package configuration files (zcborConfig.cmake) that would allow users to build, install, and consume zcbor as a CMake package using find_package(zcbor).

Motivations:

  • Standard CMake Integration: Many C/C++ projects use CMake and expect dependencies to be discoverable via find_package().
  • Ease of Use: Installing zcbor as a package simplifies integration for downstream projects and package managers.
  • Best Practices: Providing a CMakeLists.txt and package config files aligns with modern CMake best practices and improves adoption.
  • Use the RAW zcbor Encoding/Decoding APIs without code generation

I have created a patch in case the requirement is accepted.

zcbor-standard-cmake-support.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions