Skip to content

[Feature-Request] Add options to avoid installing some dependencies with Hunter #1021

Open
@traversaro

Description

@traversaro

Start with the why:

I am trying to integrated depthai-core in an existing C++ code base in which many dependencies (such as opencv and pcl) are managed via the conda package manager, installing packages from conda-forge. In this context, I would like to minimize the chance of packages installed by conda to conflict with packages installed via Hunter. As discussed in #411, just setting HUNTER_ENABLE to OFF is not an option, as some dependencies are patched to work correctly with depthai-core, so you can't use the stock version. However, I would like to be able to use the conda version of dependencies that should work out of the box and I already used in the rest of the codebase, such as nlohmann_json, bzip2, spdlog and jsoncpp

Move to the what:

I would like to have a set of granular options to specify if hunter_add_package should be called or not for a package. Currently there is HUNTER_ENABLE to enable/disable hunter_add_package for all packages, but this can't work for the reason described in the previous section.

Move to the how:

My idea was to have options such as DEPTHAI_USE_EXTERNAL_<pkgname> for each pkgname . These variable will be mark_as_advanced and set to FALSE by default, to not interfere with existing workflow. If a given DEPTHAI_USE_EXTERNAL_<pkgname> option will be enabled, hunter_add_package(<pkgname>) will not be called, and the "normal" find_package(<pkgname>) will be used instead.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions