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] Add support for OVERRIDE_FIND_PACKAGE #619

Open
Jazzinghen opened this issue Nov 18, 2024 · 1 comment
Open

[Feature request] Add support for OVERRIDE_FIND_PACKAGE #619

Jazzinghen opened this issue Nov 18, 2024 · 1 comment

Comments

@Jazzinghen
Copy link

When adding a package using CPM is not possible to use that package to override the results of find_package, which generates issues with third-party packages using it to find dependencies.

CMake added the option OVERRIDE_FIND_PACKAGE to FetchContent_Declare to help in this case by automatically updating some read-only properties. Would it be possible to support this option?

@Avus-c
Copy link
Contributor

Avus-c commented Nov 18, 2024

This is already supported :)
All arguments that aren't parsed by CPM directly / CPM doesn't know about, are passed directly to FetchContent_Declare.

Something like this should work.

CPMFindPackage(
  ....
  OVERRIDE_FIND_PACKAGE <name>
  ...
)

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

No branches or pull requests

2 participants