mapbox / mapbox/protozero

[CMake] protozero targets

Open
#136 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
381
Forks
82
PR merge metrics
No merged PRs in 30d

Description

Currently, the CMake files do not create a target for the protozero library itself.
CMake supports so called interface targets, which are targets which contain only header files but do not build anything.
So instead of making the includes available everywhere, an application that wants to use protozero can link against that target.
(The canonical way would be to call it `protozero::protozero`).

Would you accept a PR that makes the required changes?
It would then allow to use protozero as via add_subdirectory, or via `find_package(protozero REQUIRED)`, but instead of manually providing a `FindProtozero.cmake` file, it would generate a `protozere-config.cmake` file upon install.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the repository's CMake files and the requested interface-target and installation behavior. Implement the protozero::protozero target and generated package configuration so consumers can use either add_subdirectory or find_package(protozero REQUIRED), then verify both usage paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.