Skip to content

Feature request: allow CPM install to prefix and find it itself via find_package() #597

Open
@leha-bot

Description

@leha-bot

It would be very convenient if CPM.cmake supports the cmake --install feature for the generic "find_package() with install prefix" workflow. It will be very convenient for total offline builds (like builds in some Linux distros, or local networks) without actually hardcoding the CPM.cmake inside repo. Furthermore, it also helps distro maintainers to package the libs which already adopted dependency management via CPM.

The potential CMake API would be like (assuming -DCPM_USE_LOCAL_PACKAGES):

find_package(CPM REQUIRED)
CPMAddPackage("some-lib")

I will make a test PR with install() if you won't mind.

Thank you for your attention and for your project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions