How to install conan package on build stage with QBS

73 Views Asked by At

I have a solution with many projects, for one of them I need to install conan package, but only if this project will be chosen to build. I am building my projects with QBS. I tried to use Probes.ConanfileProbe in qbs file, but it seems that conan installs the package while resolving the project.

1

There are 1 best solutions below

0
Daria On

I found the way: you need to create the condition inside Probs:

condition: {
            var enabled = Environment.getEnv("BUILD")
            return enabled !== undefined || enabled.split(";").indexOf(name) !== -1
        }

so, if you want to build project, you initialize BUILD env variable