conan-io / conan-io/docs

Wrokspaces not calling system_requirements

Open
#1,674 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
125
Forks
382
Avg merge
22h 39m
Merged PRs (30d)
21

Description

Hi !
I Have been struggling for days to find a way of using distribution packages when available instead of building all from conan sources packages. I use conan this way :
* include conanbuildinfo.cmake in my cmakelists.txt
* resolve dependencies using find_package generator + cmake find_package

Our internal packages are resolved as conan packages
Third party libraries are resolved as system dependencies if possible and as conan packages as fallback. CMake is using find_package in both cases

To simplify the mechanism on conan side, I created a python wrapper around conan to add a method
requires_package(dict)
where dict is pairs of distro/windows_subsystem/'conan' => package_name
it calls package tool install during system_requirements if the distro has an associated package
otherwise it will fallback to conan package with a warning.

So far, so good, it works like a charm on debian/arch/msys2 for a simple project.
But if i use the workspace feature, system_requirements() is not called and the build fail when cmake is calling the find_package macro as package has not been installed

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.