[Development] Visual Studio generator "autogen"

Scott Bloom scott at towel42.com
Wed Apr 15 19:42:59 CEST 2026


Qt version 6.11.0 in C:/Qt/install/6.11.0/li 
cmake version 4.2.3-msvc3
VS 2026

My projects in general, are not "Qt only" and I have been using CMake and Qt for about 15 years now.  So I have tons of my own scripts/modules for working with them.  (Note I forget which Qt Dev Days it was but I presented a "Using CMake with Qt" about 12 years or so ago.)

For the most part I do not use the "qt_standard_project_setup()"  I don’t usually use the auto functionality, for a host of reasons.

However, I have recently been developing a number of Qt Designer Plugins for a project I am working on.  Mostly for intellectual curiosity, as in the past I mostly just promoted to the custom widget.  Unfortunately, I have not been able to reproduce the steps that automoc creates for the plugins, so I am using it only in those projects.

This is when I have been hitting the random folders propagating.

Ill play with the QT_TARGETS_FOLDER and see if things clean up.

Thanks

Scott



-----Original Message-----
From: Joerg Bornemann <joerg.bornemann at qt.io> 
Sent: Wednesday, April 15, 2026 07:10
To: Scott Bloom <scott at towel42.com>; development at qt-project.org
Subject: Re: [Development] Visual Studio generator "autogen"

On 4/9/26 12:44 AM, Scott Bloom wrote:

> When I use AUTO functionality for qt and cmake, it generates 
> additional targets, that tend to clutter the IDE solution.
> 
> I always run with
> 
> set_property( GLOBAL PROPERTY USE_FOLDERS ON )

[...]

> First, doesn’t anyone know how to set the folder property on the 
> autogen targets?
> 
> Second, what do people think about adding a 
> “QT_GENERATED_TARGETS_FOLDER” into the Qt cmake flow, so this is done 
> automatically?

With a recent enough Qt and using qt_standard_project_setup() [1] I don't see the target clutter.
Which versions of
- Qt
- CMake
- Visual Studio
are you using?

Also, there is QT_TARGETS_FOLDER [2] which seems to serve the purpose of your proposed QT_GENERATED_TARGETS_FOLDER.

I have mentioned this also the last time you brought this up:
https://lists.qt-project.org/pipermail/development/2025-October/046663.html


Cheers,

Joerg

[1] https://doc.qt.io/qt-6/qt-standard-project-setup.html
[2] https://doc.qt.io/qt-6/cmake-global-property-qt-targets-folder.html


More information about the Development mailing list