[英]How to install conan package on build stage with QBS
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.我有一个包含许多项目的解决方案,其中一个我需要安装柯南 package,但前提是要选择构建这个项目。 I am building my projects with QBS.
我正在使用 QBS 构建我的项目。 I tried to use Probes.ConanfileProbe in qbs file, but it seems that conan installs the package while resolving the project.
我尝试在 qbs 文件中使用 Probes.ConanfileProbe,但似乎柯南在解决项目时安装了 package。
I found the way: you need to create the condition inside Probs:我找到了方法:您需要在 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所以,如果你想构建项目,你初始化 BUILD 环境变量
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.