After installation however, I could not find an automated way of adding installed Qt binaries to my binary search path. Even after many searches online, I did not find any sample
conanfile.txt
anywhere showcasing the proper way to install Qt with conan. After going through conan documentation however, I found out that conan generator virtualrunenv
can be used to tackle this problem. virtualrunenv
generator can be used to add/remove directories installed by conan to your binary search path.
To add Qt binaries installed by conan to your PATH, execute:
source activate_run.sh
To remove them from the search path, execute:
source deactivate_run.sh
By adding virtualrunenv as one of your code generators, you can easily bring/remove qt binaries to/from your search path.
Below is my
conanfile.txt
which I use to install latest Qt 5.15.x via conan:
[requires] qt/[>=5.15.0 <5.16.0]@bincrafters/stable [generators] qmake virtualrunenv
Some of the disadvantages of using Conan to install Qt:
- Qt installed via conan does not include Qt designer and other binaries. It only includes qmake.
- Qt installation via Conan still requires few packages to be manually installed via APT.
1 comment:
Actually, if we add `qt:qttools=True` option in `conan install` command or in `conanfile.txt`, it will include Qt Designer and other binaries. I've already tried and it worked.
Post a Comment