Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.0
Description
If a user wants to use CMake to develop an app against a static build of Qt, they currently need to install development packages of all Qt private dependencies.
That's not the case if the user uses qmake to build their app.
The reason is that in a static Qt build, all private dependencies become public dependencies, and thus the various QtFooConfig.cmake files call find_dependency(3rdPartyLib), which loads Find3rdPartyLib.cmake, which usually contains find_path() statements to find include paths and find_library() calls to find the libraries.
We care only about the libraries to link against them, but if the include files are not found, the package will be marked as not found, no CMake targets will be created, and the configuration of the app will fail saying that various targets are not found.
The workaround is to install the -dev packages that provide the include files.
The simple and suboptimal fix is to create and adjust all our FindFoo.cmake files to allow skipping finding include paths.
This will most likely surface for our iOS and WebAssembly static Qt builds.