Skip to content

Add packages without changing original source #255

Closed

Description

@matslil

Would it be possible to use CMAKE_TOOLCHAIN_FILE as a way to "patch" CMake projects? Apart from the usual work that a toolchain file needs to do, when adding external projects it could also:

  • Make sure HunterGate is initialised properly
  • Overload find_package(), so hunter_add_package() is called when appropriate

This would not solve all problems that forks solve, but might mean that fewer projects need to be forked.

Would this work?

Activity

  1. NeroBurner commented on Sep 3, 2020

    @NeroBurner

    I think overloading find_package() isn't a great idea, because it can have side effects

    https://hunter.readthedocs.io/en/latest/faq/why-do-we-need-hunter-add-package.html

  2. rbsheth commented on Oct 5, 2020

    @rbsheth
    Member

    I don't think we can use the toolchain file for this. However, we can have instructions to patch sources after download to avoid the creation of forks. Anything to make the process of adding packages here simpler is welcomed!

  3. NeroBurner commented on Oct 10, 2025

    @NeroBurner

    possible duplicate of #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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