[Development] Licensing of qtbase

Jörg Bornemann joerg.bornemann at qt.io
Tue Aug 2 11:19:11 CEST 2022


On 7/16/22 12:00, Felix Crazzolara wrote:

> I wanted now to write some CMake code to ensure that Qt is always and 
> entirely linked dynamically. For that purpose, I intended to iterate 
> through the target properties LINK_LIBRARIES and 
> INTERFACE_LINK_LIBRARIES of Qt5::Widgets or Qt6::Widgets and check that 
> all dependencies resolve to shared libraries eventually.
> 
> I have now two questions. First, is there some existing code in the Qt 
> code base that does what I want already?

There is code for that as part of the .pri file generation, but it's not 
ready to be used outside of its scope.  See QtPriHelpers.cmake for details.

> Secondly, I noticed that an interface dependency of Qt6::Widgets is 
> Qt6::CoreQt6::Gui and if I check whether Qt6::CoreQt6::Gui is a target 
> with "if (TARGET Qt::CoreQt6::Gui)", it turns out that it is not. This 
> confused me since it doesn't seem like a valid library name to me. How 
> can I resolve Qt6::CoreQt6::Gui to an absolute file path?

Qt6::CoreQt6::Gui looks wrong and should not appear as dependency.
Are you sure that this is not an artifact of your code that extracts the 
dependencies?


Cheers,

Joerg


More information about the Development mailing list