diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-05-06 15:15:22 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2022-08-11 13:47:15 +0200 |
commit | 55af91f822027f079e435eb13d9bf379496fe1bb (patch) | |
tree | d9a3391af4806bb686136ee93045167d788bbcdd /src/corelib/doc/src/cmake/qt_standard_project_setup.qdoc | |
parent | 548440dd4bc1f92bef41863819ecaf054d924b6c (diff) |
CMake: Put Qt-internal targets into a dedicated FOLDER
When loading a Qt CMake project in an IDE like Visual Studio, many
Qt-internal targets are visible, right next to the user's targets. This
is inconvenient and confusing.
Use CMake's FOLDER concept, and put Qt-internal targets into a dedicated
FOLDER.
For that we introduce the new global property QT_TARGETS_FOLDER that,
analoguous to AUTOGEN_TARGETS_FOLDER, is the folder name for Qt-internal
targets. By default, it's not set, nor is folder support enabled.
Change qt_standard_project_setup() to
- enable folder support
- initialize QT_TARGETS_FOLDER if unset
- initialize AUTOGEN_TARGETS_FOLDER to the same value if unset
Set the FOLDER property of qtbase's internal targets for user projects
to the value of QT_TARGETS_FOLDER.
Task-number: QTBUG-99808
Change-Id: I880ac7731f88faa83a384dcdec98b1b88ac6cc2e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/doc/src/cmake/qt_standard_project_setup.qdoc')
-rw-r--r-- | src/corelib/doc/src/cmake/qt_standard_project_setup.qdoc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/doc/src/cmake/qt_standard_project_setup.qdoc b/src/corelib/doc/src/cmake/qt_standard_project_setup.qdoc index b94d688e49..63e78d1275 100644 --- a/src/corelib/doc/src/cmake/qt_standard_project_setup.qdoc +++ b/src/corelib/doc/src/cmake/qt_standard_project_setup.qdoc @@ -42,6 +42,9 @@ have been defined. It does the following things: \c{${CMAKE_CURRENT_BINARY_DIR}}. \li When target platforms other than Apple or Windows, \c{CMAKE_INSTALL_RPATH} will be augmented as described below. +\li CMake's \l USE_FOLDERS property is set to \c{ON}, and \l QT_TARGET_FOLDER is + set to \c{QtInternalTargets}. IDEs that support folders will display + Qt-internal targets in this folder. \endlist On platforms that support \c{RPATH} (other than Apple platforms), two values @@ -57,6 +60,9 @@ will find their link-time dependencies, assuming projects install them to the default locations the \l{install(TARGETS)} command uses when no destination is explicitly provided. +To disable folder support for IDEs, set \l USE_FOLDERS to \c OFF before or after +the call to \c{qt_standard_project_setup}. + The \c{qt_standard_project_setup()} command can effectively be disabled by setting the \l{QT_NO_STANDARD_PROJECT_SETUP} variable to true. |