CMake Variable Reference
Qt modules loaded with
find_package set various variables.
Note: You rarely need to access these variables directly. Common tasks like linking against a module should be done through the library targets each module defines.
find_package(Qt6 COMPONENTS Widgets), when successful, makes the following variables available:
|A list of compile definitions to use when building against the library.|
|A list of definitions to use when building against the library.|
|A string of flags to use when building executables against the library.|
|A boolean that describes whether the module was found successfully.|
|A list of include directories to use when building against the library.|
|The name of the imported target for the module: |
|A list of private include directories to use when building against the library and using private Qt API.|
|A string containing the module's version.|
For all packages found with
find_package, equivalents of these variables are available; they are case-sensitive.
Additionally, there are also variables that don't relate to a particular package, but to the Qt installation itself.
|An integer that controls the Qt version that |
If set to
If not set, the first
|A string that holds the infix used in library names, when Qt is configured with |
|Hides commands that start with |
|Hides the imported targets starting with |
|On Unix, a boolean that describes whether Qt libraries and plugins were compiled with |
These variables can influence CMake commands provided by Qt. They may be set by the project, a toolchain file or other third-party packages.
Android-specific architecture of the host system
Location of the Android SDK
List of ABIs that the project packages are built for
List of arguments to pass to Android applications
Enables building multi-ABI packages using the autodetected Qt for Android SDK list
Sign the .aab package with the specified keystore, alias and store password
Sign the package with the specified keystore, alias and store password
Prefix-relative subdirectory for deploying runtime binaries on some target platforms
Prefix-relative subdirectory for deploying libraries on some target platforms
Prefix-relative subdirectory for deploying Qt plugins on some target platforms
Base location for a deployment
Prefix-relative subdirectory for deploying QML plugins on some target platforms
Name of the file to include for setting up deployment support
Enables verbose mode of deployment tools
Location of the host Qt installation when cross-compiling
Path to iOS launch screen storyboard used by all targets
Prevents collecting of project-built shared library targets during Android deployment
Disables providing a fallback app bundle ID during target finalization on iOS
Disables providing a fallback team ID during target finalization on iOS
Prevents subsequent calls to qt_standard_project_setup() from making any changes
Set of variables to specify the path to Qt for Android for the corresponding ABI
Base output directory below which QML modules will be created by default
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.