Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
leha-bot opened this issue Sep 4, 2024 · 0 comments · May be fixed by #598
Open

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

leha-bot opened this issue Sep 4, 2024 · 0 comments · May be fixed by #598

Comments

@leha-bot
Copy link

leha-bot commented Sep 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant