[Interest] Qt 6.10 RC on Android - failing to find headers

Nuno Santos nuno.santos at imaginando.pt
Wed Oct 15 18:28:53 CEST 2025


Alexandru,

Sorry for the late reply. I've only been able to look at this today.

It worked!

Thank you!

Best regards,

Nuno

> On 6 Oct 2025, at 11:22, Alexandru Croitor <alexandru.croitor at qt.io> wrote:
> 
> Hi,
> 
> Adjust your CMakeLists.txt to contain something like
> 
> find_package(Qt6 REQUIRED COMPONENTS GuiPrivate)
> find_package(Qt6 REQUIRED COMPONENTS QuickPrivate)
> 
> target_link_libraries(YourTarget PRIVATE Qt6::GuiPrivate Qt6::QuickPrivate)
> 
> If your project has multiple targets (executables, libraries), you should add such a target_link_libraries call to each of them that use the specific private headers.
> 
> 
>> On 2. Oct 2025, at 14:04, Nuno Santos via Interest <interest at qt-project.org> wrote:
>> 
>> Marius,
>> 
>> Thanks for your reply.
>> 
>> Can you please share a snippet on how to import it properly?
>> 
>> I’m still adapting to CMake. 
>> 
>> Thanks!
>> 
>> Regards,
>> 
>> Nuno
>> 
>>> On 2 Oct 2025, at 12:57, Marius Kittler <mkittler at suse.de> wrote:
>>> 
>>> Hi,
>>> 
>>>> Has anyone been faced with similar problems?
>>> 
>>> I don't have any problems using private headers when compiling for Android on 
>>> a recent dev build of Qt. I can only tell you that the way you're adding 
>>> header search paths for private Qt modules is probably not how it is supposed 
>>> to be done. Just use the target of private modules in the same way you would 
>>> add the target of regular modules, so e.g. use CorePrivate just like you add 
>>> Core. Also, avoid altering the global build env with functions like 
>>> include_directories and set target properties instead.
>>> 
>>> Regards,
>>> Marius_______________________________________________
>>> Interest mailing list
>>> Interest at qt-project.org
>>> https://lists.qt-project.org/listinfo/interest
>> 
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> https://lists.qt-project.org/listinfo/interest
> 



More information about the Interest mailing list