Details
-
User Story
-
Resolution: Out of scope
-
P2: Important
-
None
-
None
Description
Once Qt is built with CMake and installed, a user wants to use the generated Qt5 CMake packages. If any of those packages have public dependencies on 3rd party libraries, those have to be found during the find_package(Qt5) process.
If the libraries are not found in the system, the easiest way to get them is most likely the same way how Qt did it, by using a vcpkg provided CMake toolchain file and install root.
In case if Qt was built with packages provided by vcpkg, what we could try and do is to provide some convenience to the user of the Qt package.
Specifically we could record the vcpkg triplet and install the necessary vcpkg cmake scripts and toolchain files. And in case find_package(Qt5) was called before the first project() call in the CMakeLists.txt file, we could set the the cmake toolchain file to one shipped with Qt, for the same triplet.
This would remove the necessity of passing multiple -D options to CMake, and make the experience nicer liker with qmake, where the command line invocation would be pretty short.
It is unclear how well such an approach would work at the moment, given that I was told on the #cmake freenode IRC channel that calling find_package() and setting the toolchain file before the project() call is not officially recommended.
Another aspect is that Coin would have to build the 3rd party libraries anyway in order to build Qt, so we could ship those vcpkg 3rd party libraries in the online / offline installers of Qt.
Attachments
Issue Links
- relates to
-
QTBUG-75870 Provide a tool and CMake variables that provide info similar to qmake -query
- Closed