diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index 424900b2884..3b47a289e45 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -154,7 +154,6 @@ The following sections describe the different types of elements used in project files. - \target ProjectFileElementsVariables \section2 Variables In a project file, variables are used to hold lists of strings. In the @@ -272,9 +271,10 @@ line as the condition. More complex operations on variables that would usually require loops - are provided by built-in functions such as \l{findfunction}{find()}, - \l{unique}{unique()}, and \l{countfunction}{count()}. These functions, and - many others are provided to manipulate + are provided by built-in functions such as \l{find(variablename, substr)} + {find()}, \l{unique(variablename)}{unique()}, and + \l{count(variablename, number)}{count()}. + These functions, and many others are provided to manipulate strings and paths, support user input, and call external tools. For more information about using the functions, see \l{qmake Language}. For lists of all functions and their descriptions, see \l{Replace Functions} and @@ -321,7 +321,6 @@ The \c SUBDIRS variable is used to contain a list of all the subdirectories to be processed. - \target GeneralConfiguration \section1 General Configuration The \l{CONFIG} variable specifies the options and features that the project @@ -488,9 +487,9 @@ You can use the \c options to specify both general and mode-specific settings. Options that only apply to the Makefile mode are described in the - \l{#MakefileMode}{Makefile Mode Options} section, whereas options that influence the + \l{Makefile Mode Options} section, whereas options that influence the creation of project files are described in the - \l{#ProjectMode}{Project Mode Options} section. + \l{Project Mode Options} section. \section1 Files @@ -551,7 +550,6 @@ files. \endlist - \target MakefileMode \section1 Makefile Mode Options \snippet code/doc_src_qmake-manual.pro 9 @@ -593,7 +591,6 @@ is specified, all assignments on the command line after the \c -after option will be postponed until after the specified files are parsed. - \target ProjectMode \section1 Project Mode Options \snippet code/doc_src_qmake-manual.pro 12 @@ -884,7 +881,6 @@ to specify a list of libraries that each project needs to link against, and \c QMAKE_LIBS_X11 would be used to extend this list. - \target ANDROID_ABIS \section1 ANDROID_ABIS \note This variable applies only to Android targets. @@ -902,7 +898,6 @@ it is not recommended since it will override any ABIs specified on the \c qmake command line. - \target ANDROID_API_VERSION \section1 ANDROID_API_VERSION \note This variable applies only to Android targets. @@ -910,7 +905,6 @@ Specifies the Android API level number. For more information, see \l{Android: Build Numbers}{Android Build Numbers}. - \target ANDROID_APPLICATION_ARGUMENTS \section1 ANDROID_APPLICATION_ARGUMENTS \note This variable applies only to Android targets. @@ -923,7 +917,6 @@ ANDROID_APPLICATION_ARGUMENTS = "arg1 arg2 arg3" \endcode - \target ANDROID_BUNDLED_JAR_DEPENDENCIES \section1 ANDROID_BUNDLED_JAR_DEPENDENCIES \note This variable applies only to Android modules. @@ -935,7 +928,6 @@ ANDROID_BUNDLED_JAR_DEPENDENCIES += jar/Qt6Android.jar \endcode - \target ANDROID_DEPLOYMENT_DEPENDENCIES \section1 ANDROID_DEPLOYMENT_DEPENDENCIES \note This variable applies only to Android targets. @@ -954,7 +946,6 @@ provides a way to override the automatic detection entirely, so if a library is listed before its dependencies, it will fail to load on some devices. - \target ANDROID_DEPLOYMENT_SETTINGS_FILE \section1 ANDROID_DEPLOYMENT_SETTINGS_FILE \note This variable applies only to Android targets. @@ -964,7 +955,6 @@ the settings file generated by qmake, thus you have to make sure to provide a valid settings file. - \target ANDROID_EXTRA_LIBS \section1 ANDROID_EXTRA_LIBS \note This variable applies only to Android targets. @@ -987,7 +977,6 @@ for (abi, ANDROID_ABIS): ANDROID_EXTRA_LIBS += $$PWD/library_name_$${abi}.so \endcode - \target ANDROID_EXTRA_PLUGINS \section1 ANDROID_EXTRA_PLUGINS \note This variable applies only to Android targets. @@ -1028,7 +1017,6 @@ ANDROID_EXTRA_PLUGINS += $$top_builddir/plugins \endcode - \target ANDROID_FEATURES \section1 ANDROID_FEATURES \note This variable applies only to Android modules. @@ -1041,7 +1029,6 @@ For more information, see \l{Android: }{Android Docs}. - \target ANDROID_LIB_DEPENDENCIES \section1 ANDROID_LIB_DEPENDENCIES \note This variable applies only to Android modules. @@ -1054,7 +1041,6 @@ plugins/libplugins_platforms_qtforandroid.so \endcode - \target ANDROID_MIN_SDK_VERSION \section1 ANDROID_MIN_SDK_VERSION \note This variable applies only to Android targets. @@ -1062,7 +1048,6 @@ Specifies the minimum Android API level for the project. By default, this variable is set to API level 23. - \target ANDROID_PACKAGE_SOURCE_DIR \section1 ANDROID_PACKAGE_SOURCE_DIR \note This variable applies only to Android targets. @@ -1083,7 +1068,6 @@ instance, you can make a custom \c {AndroidManifest.xml} for your application, then place this directly into the directory specified by this variable. - \target ANDROID_PERMISSIONS \section1 ANDROID_PERMISSIONS \note This variable applies only to Android modules. @@ -1096,7 +1080,6 @@ For more information, see \l{Android: }{Android Docs}. - \target ANDROID_TARGET_SDK_VERSION \section1 ANDROID_TARGET_SDK_VERSION \note This variable applies only to Android targets. @@ -1104,7 +1087,6 @@ Specifies the target Android API level for the project. By default, this variable is set to API level 31. - \target ANDROID_VERSION_CODE \section1 ANDROID_VERSION_CODE \note This variable applies only to Android targets. @@ -1112,7 +1094,6 @@ Specifies the application's version number. For more information, see \l{Android: App Versioning}{Android App Versioning}. - \target ANDROID_VERSION_NAME \section1 ANDROID_VERSION_NAME \note This variable applies only to Android targets. @@ -1120,7 +1101,6 @@ Specifies the application's version in as a human readable string. For more information, see \l{Android: App Versioning}{Android App Versioning}. - \target CONFIG \section1 CONFIG Specifies project configuration and compiler options. The values are @@ -1280,11 +1260,11 @@ qmake to track these dependencies. When this option is enabled, qmake will create a file with the extension \c .prl which will save meta-information about the library - (see \l{LibDepend}{Library Dependencies} for more info). + (see \l{Library Dependencies} for more info). \row \li link_prl \li When this option is enabled, qmake will process all libraries linked to by the application and find their meta-information (see - \l{LibDepend}{Library Dependencies} for more info). + \l{Library Dependencies} for more info). \row \li no_install_prl \li This option disables the generation of installation rules for generated .prl files. \endtable @@ -1391,7 +1371,6 @@ \snippet code/doc_src_qmake-manual.pro 26 - \target DEFINES \section1 DEFINES qmake adds the values of this variable as @@ -1401,7 +1380,6 @@ \snippet code/doc_src_qmake-manual.pro 27 - \target DEFINES_DEBUG \section1 DEFINES_DEBUG Specifies preprocessor defines for the debug configuration. The values of @@ -1411,7 +1389,6 @@ This variable was introduced in Qt 5.13.2. - \target DEFINES_RELEASE \section1 DEFINES_RELEASE Specifies preprocessor defines for the release configuration. The values of @@ -1424,21 +1401,18 @@ This variable was introduced in Qt 5.13.2. - \target DEF_FILE \section1 DEF_FILE \note This variable is used only on Windows when using the \c app template. Specifies a \c .def file to be included in the project. - \target DEPENDPATH \section1 DEPENDPATH Specifies a list of directories for qmake to scan, to resolve dependencies. This variable is used when qmake crawls through the header files that you \c{#include} in your source code. - \target DESTDIR \section1 DESTDIR Specifies where to put the \l{#TARGET}{target} file. @@ -1451,7 +1425,6 @@ the used build tool. In particular, parentheses do not work with \c{make}. - \target DISTFILES \section1 DISTFILES Specifies a list of files to be included in the dist @@ -1461,14 +1434,12 @@ \snippet code/doc_src_qmake-manual.pro 31 - \target DLLDESTDIR \section1 DLLDESTDIR \note This variable applies only to Windows targets. Specifies where to copy the \l{#TARGET}{target} dll. - \target EXTRA_TRANSLATIONS \section1 EXTRA_TRANSLATIONS Specifies a list of translation (.ts) files that contain @@ -1486,7 +1457,6 @@ See the \l{Qt Linguist Manual} for more information about internationalization (i18n) and localization (l10n) with Qt. - \target FORMS \section1 FORMS Specifies the UI files (see \l{Qt Designer Manual}) to be processed by \c uic @@ -1497,7 +1467,6 @@ \snippet code/doc_src_qmake-manual.pro 32 - \target GUID \section1 GUID Specifies the GUID that is set inside a \c{.vcproj} file. The GUID is @@ -1507,7 +1476,6 @@ This variable is specific to \c{.vcproj} files only; it is ignored otherwise. - \target HEADERS \section1 HEADERS Defines the header files for the project. @@ -1522,20 +1490,17 @@ See also \l{#SOURCES}{SOURCES}. - \target ICON \section1 ICON This variable is used only on Mac OS to set the application icon. Please see \l{Setting the Application Icon}{the application icon documentation} for more information. - \target IDLSOURCES \section1 IDLSOURCES This variable is used only on Windows for the Visual Studio project generation to put the specified files in the Generated Files folder. - \target INCLUDEPATH \section1 INCLUDEPATH Specifies the #include directories which should be @@ -1550,7 +1515,6 @@ \snippet qmake/spaces.pro quoting include paths with spaces - \target INSTALLS \section1 INSTALLS Specifies a list of resources that will be installed when @@ -1604,28 +1568,24 @@ This variable is also used to specify which additional files will be deployed to embedded devices. - \target JAVA_HOME \section1 JAVA_HOME \note This variable is useful only to Android targets. Specifies the JDK/OpenJDK installation path used for building the project. - \target LEXIMPLS \section1 LEXIMPLS Specifies a list of Lex implementation files. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target LEXOBJECTS \section1 LEXOBJECTS Specifies the names of intermediate Lex object files. The value of this variable is typically handled by qmake and rarely needs to be modified. - \target LEXSOURCES \section1 LEXSOURCES Specifies a list of Lex source files. All @@ -1636,7 +1596,6 @@ \snippet code/doc_src_qmake-manual.pro 37 - \target LIBS \section1 LIBS Specifies a list of libraries to be linked into the project. @@ -1660,7 +1619,6 @@ \snippet code/doc_src_qmake-manual.pro 39 - \target LIBS_PRIVATE \section1 LIBS_PRIVATE Specifies a list of libraries to be linked privately into the project. @@ -1673,7 +1631,6 @@ directly, it needs to link to A explicitly. Put differently, libraries linked privately are not exposed transitively at build time. - \target LITERAL_HASH \section1 LITERAL_HASH This variable is used whenever a literal hash character (\c{#}) is needed in @@ -1687,14 +1644,12 @@ By using \c LITERAL_HASH in this way, the \c # character can be used to construct a URL for the \c message() function to print to the console. - \target MAKEFILE \section1 MAKEFILE Specifies the name of the generated Makefile. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target MAKEFILE_GENERATOR \section1 MAKEFILE_GENERATOR Specifies the name of the Makefile generator to use @@ -1702,13 +1657,11 @@ handled internally by qmake and rarely needs to be modified. - \target MSVCPROJ_* \section1 MSVCPROJ_* These variables are handled internally by qmake and should not be modified or utilized. - \target MOC_DIR \section1 MOC_DIR Specifies the directory where all intermediate moc @@ -1718,7 +1671,6 @@ \snippet code/doc_src_qmake-manual.pro 40 - \target OBJECTIVE_HEADERS \section1 OBJECTIVE_HEADERS Defines the Objective-C++ header files for the project. @@ -1732,7 +1684,6 @@ See also \l{#OBJECTIVE_SOURCES}{OBJECTIVE_SOURCES}. - \target OBJECTIVE_SOURCES \section1 OBJECTIVE_SOURCES Specifies the names of all Objective-C/C++ source files in the project. @@ -1742,14 +1693,12 @@ See also \l{#OBJECTIVE_HEADERS}{OBJECTIVE_HEADERS}. - \target OBJECTS \section1 OBJECTS This variable is automatically populated from the \l{SOURCES} variable. The extension of each source file is replaced by .o (Unix) or .obj (Win32). You can add objects to the list. - \target OBJECTS_DIR \section1 OBJECTS_DIR Specifies the directory where all intermediate @@ -1759,7 +1708,6 @@ \snippet code/doc_src_qmake-manual.pro 41 - \target POST_TARGETDEPS \section1 POST_TARGETDEPS Lists the libraries that the \l{#TARGET}{target} depends on. Some backends, @@ -1771,7 +1719,6 @@ This list is placed after all builtin (and \link #PRE_TARGETDEPS $$PRE_TARGETDEPS \endlink) dependencies. - \target PRE_TARGETDEPS \section1 PRE_TARGETDEPS Lists libraries that the \l{#TARGET}{target} depends on. Some backends, @@ -1782,7 +1729,6 @@ This list is placed before all builtin dependencies. - \target PRECOMPILED_HEADER \section1 PRECOMPILED_HEADER Indicates the header file for creating a precompiled @@ -1791,7 +1737,6 @@ (Windows - all MSVC project types, Apple - Xcode, Makefile, Unix - gcc 3.3 and up). - \target PWD \section1 PWD Specifies the full path leading to the directory @@ -1803,7 +1748,6 @@ \note Do not attempt to overwrite the value of this variable. - \target OUT_PWD \section1 OUT_PWD Specifies the full path leading to the directory where qmake places the @@ -1811,7 +1755,6 @@ \note Do not attempt to overwrite the value of this variable. - \target QM_FILES_RESOURCE_PREFIX \section1 QM_FILES_RESOURCE_PREFIX Specifies the directory in the resource system where \c .qm files will @@ -1819,14 +1762,12 @@ The default is \c{:/i18n/}. - \target QM_FILES_INSTALL_PATH \section1 QM_FILES_INSTALL_PATH Specifies the target directory \c .qm files generated by \l{CONFIG}{CONFIG += lrelease} will be installed to. Does not have any effect if \l{CONFIG}{CONFIG += embed_translations} is set. - \target QML_IMPORT_PATH \section1 QML_IMPORT_PATH This variable is only used by \l{Qt Creator Manual}{Qt Creator}. If you have @@ -1835,7 +1776,6 @@ See \l{Qt Creator: Using QML Modules with Plugins} for details. - \target QMLPATHS \section1 QMLPATHS Expects a list of import paths that point to root directories of trees of @@ -1853,17 +1793,15 @@ application. Rather, they are only used at build time. In particular, qmlimportscanner uses them to find any QML modules it may need to mark as imported by your application. - + \sa QQmlEngine::addImportPath() - \target QMAKE_systemvariable \section1 QMAKE Specifies the name of the qmake program itself and is placed in generated Makefiles. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKESPEC_systemvariable \section1 QMAKESPEC A system variable that contains the full path of the qmake configuration that is used @@ -1871,7 +1809,6 @@ \note Do not attempt to overwrite the value of this variable. - \target QMAKE_AR_CMD \section1 QMAKE_AR_CMD \note This variable is used on Unix platforms only. @@ -1879,7 +1816,6 @@ Specifies the command to execute when creating a shared library. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_BUNDLE_DATA \section1 QMAKE_BUNDLE_DATA \note This variable is used on \macos, iOS, tvOS, and watchOS only. @@ -1958,21 +1894,18 @@ adjusted by modifying the \c QMAKE_CFLAGS_DEBUG and \c QMAKE_CFLAGS_RELEASE variables, respectively. - \target QMAKE_CFLAGS_DEBUG \section1 QMAKE_CFLAGS_DEBUG Specifies the C compiler flags for debug builds. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CFLAGS_RELEASE \section1 QMAKE_CFLAGS_RELEASE Specifies the C compiler flags for release builds. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO \section1 QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO Specifies the C compiler flags for release builds where @@ -1980,7 +1913,6 @@ The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CFLAGS_SHLIB \section1 QMAKE_CFLAGS_SHLIB \note This variable is used on Unix platforms only. @@ -1990,7 +1922,6 @@ qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CFLAGS_THREAD \section1 QMAKE_CFLAGS_THREAD Specifies the compiler flags for creating a multi-threaded @@ -1998,21 +1929,18 @@ qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CFLAGS_WARN_OFF \section1 QMAKE_CFLAGS_WARN_OFF This variable is used only when the \c {warn_off} \l{#CONFIG}{CONFIG} option is set. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CFLAGS_WARN_ON \section1 QMAKE_CFLAGS_WARN_ON This variable is used only when the \c {warn_on} \l{#CONFIG}{CONFIG} option is set. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CLEAN \section1 QMAKE_CLEAN Specifies a list of generated files (by \l{moc} and \l{uic}, for example) and @@ -2034,21 +1962,18 @@ adjusted by modifying the \c QMAKE_CXXFLAGS_DEBUG and \c QMAKE_CXXFLAGS_RELEASE variables, respectively. - \target QMAKE_CXXFLAGS_DEBUG \section1 QMAKE_CXXFLAGS_DEBUG Specifies the C++ compiler flags for debug builds. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CXXFLAGS_RELEASE \section1 QMAKE_CXXFLAGS_RELEASE Specifies the C++ compiler flags for release builds. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO \section1 QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO Specifies the C++ compiler flags for release builds where @@ -2056,7 +1981,6 @@ The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CXXFLAGS_SHLIB \section1 QMAKE_CXXFLAGS_SHLIB Specifies the C++ compiler flags for creating a shared library. @@ -2064,14 +1988,12 @@ qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CXXFLAGS_THREAD \section1 QMAKE_CXXFLAGS_THREAD Specifies the C++ compiler flags for creating a multi-threaded application. The value of this variable is typically handled by qmake or \l{#QMAKESPEC} {qmake.conf} and rarely needs to be modified. - \target QMAKE_CXXFLAGS_WARN_OFF \section1 QMAKE_CXXFLAGS_WARN_OFF Specifies the C++ compiler flags for suppressing compiler @@ -2079,7 +2001,6 @@ qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_CXXFLAGS_WARN_ON \section1 QMAKE_CXXFLAGS_WARN_ON Specifies C++ compiler flags for generating compiler warnings. @@ -2087,7 +2008,6 @@ qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_DEVELOPMENT_TEAM \section1 QMAKE_DEVELOPMENT_TEAM \note This variable is used on \macos, iOS, tvOS, and watchOS only. @@ -2095,12 +2015,10 @@ The identifier of a development team to use for signing certificates and provisioning profiles. - \target QMAKE_DISTCLEAN \section1 QMAKE_DISTCLEAN Specifies a list of files to be removed by \c{make distclean}. - \target QMAKE_EXTENSION_SHLIB \section1 QMAKE_EXTENSION_SHLIB Contains the extension for shared libraries. The value of @@ -2110,7 +2028,6 @@ \note Platform-specific variables that change the extension override the contents of this variable. - \target QMAKE_EXTENSION_STATICLIB \section1 QMAKE_EXTENSION_STATICLIB Contains the extension for shared static libraries. The value of @@ -2121,51 +2038,51 @@ Contains the extension used on included moc files. - See also \l{Configuring qmake#Extensions}{File Extensions}. + See also \l{Configuring qmake#File Extensions}{File Extensions}. \section1 QMAKE_EXT_UI Contains the extension used on \QD UI files. - See also \l{Configuring qmake#Extensions}{File Extensions}. + See also \l{Configuring qmake#File Extensions}{File Extensions}. \section1 QMAKE_EXT_PRL Contains the extension used on created PRL files. - See also \l{Configuring qmake#Extensions}{File Extensions}, - \l{LibDepend}{Library Dependencies}. + See also \l{Configuring qmake#File Extensions}{File Extensions}, + \l{Library Dependencies}. \section1 QMAKE_EXT_LEX Contains the extension used on files given to Lex. - See also \l{Configuring qmake#Extensions}{File Extensions}, + See also \l{Configuring qmake#File Extensions}{File Extensions}, \l{#LEXSOURCES}{LEXSOURCES}. \section1 QMAKE_EXT_YACC Contains the extension used on files given to Yacc. - See also \l{Configuring qmake#Extensions}{File Extensions}, + See also \l{Configuring qmake#File Extensions}{File Extensions}, \l{#YACCSOURCES}{YACCSOURCES}. \section1 QMAKE_EXT_OBJ Contains the extension used on generated object files. - See also \l{Configuring qmake#Extensions}{File Extensions}. + See also \l{Configuring qmake#File Extensions}{File Extensions}. \section1 QMAKE_EXT_CPP Contains suffixes for files that should be interpreted as C++ source code. - See also \l{Configuring qmake#Extensions}{File Extensions}. + See also \l{Configuring qmake#File Extensions}{File Extensions}. \section1 QMAKE_EXT_H Contains suffixes for files which should be interpreted as C header files. - See also \l{Configuring qmake#Extensions}{File Extensions}. + See also \l{Configuring qmake#File Extensions}{File Extensions}. \section1 QMAKE_EXTRA_COMPILERS @@ -2179,7 +2096,6 @@ See also \l{Adding Custom Targets}. - \target QMAKE_FAILED_REQUIREMENTS \section1 QMAKE_FAILED_REQUIREMENTS Contains the list of failed requirements. @@ -2200,7 +2116,6 @@ See \l{Creating Frameworks} for more information about creating frameworks and library bundles. - \target QMAKE_FRAMEWORK_VERSION \section1 QMAKE_FRAMEWORK_VERSION \note This variable is used on \macos, iOS, tvOS, and watchOS only. @@ -2214,7 +2129,6 @@ See \l{Creating Frameworks} for more information about creating frameworks. - \target QMAKE_HOST \section1 QMAKE_HOST Provides information about the host machine running qmake. @@ -2233,14 +2147,12 @@ \snippet code/doc_src_qmake-manual.pro 187 - \target QMAKE_INCDIR \section1 QMAKE_INCDIR Specifies the list of system header paths that are appended to \l{INCLUDEPATH}. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_INCDIR_EGL \section1 QMAKE_INCDIR_EGL Specifies the location of EGL header files to be added to @@ -2249,7 +2161,6 @@ qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_INCDIR_OPENGL \section1 QMAKE_INCDIR_OPENGL Specifies the location of OpenGL header files to be added @@ -2273,7 +2184,6 @@ If the OpenGL implementation uses EGL (most OpenGL/ES systems), then QMAKE_INCDIR_EGL may also need to be set. - \target QMAKE_INCDIR_OPENVG \section1 QMAKE_INCDIR_OPENVG Specifies the location of OpenVG header files to be added @@ -2285,7 +2195,6 @@ If the OpenVG implementation uses EGL then QMAKE_INCDIR_EGL may also need to be set. - \target QMAKE_INCDIR_X11 \section1 QMAKE_INCDIR_X11 \note This variable is used on Unix platforms only. @@ -2295,7 +2204,6 @@ is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_INFO_PLIST \section1 QMAKE_INFO_PLIST \note This variable is used on \macos, iOS, tvOS, and watchOS platforms only. @@ -2389,7 +2297,6 @@ platform or type of project, use one of the specialized variables for that purpose instead of this variable. - \target QMAKE_LFLAGS_CONSOLE \section1 QMAKE_LFLAGS_CONSOLE \note This variable is used on Windows only. @@ -2657,7 +2564,6 @@ value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_LRELEASE_FLAGS \section1 QMAKE_LRELEASE_FLAGS List of additional options passed to \l{Using lrelease}{lrelease} when @@ -2694,7 +2600,6 @@ files for IDEs. The default value is the target name. The value of this variable is typically handled by qmake and rarely needs to be modified. - \target QMAKE_PROVISIONING_PROFILE \section1 QMAKE_PROVISIONING_PROFILE \note This variable is used on \macos, iOS, tvOS, and watchOS only. @@ -2827,7 +2732,6 @@ variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target QMAKE_TARGET_COMPANY \section1 QMAKE_TARGET_COMPANY Windows only. Specifies the company for the project target; this is @@ -2835,7 +2739,6 @@ properties. This is only utilized if the \l{VERSION} or \l{RC_ICONS} variable is set and the \l{RC_FILE} and \l{RES_FILE} variables are not set. - \target QMAKE_TARGET_DESCRIPTION \section1 QMAKE_TARGET_DESCRIPTION Windows only. Specifies the description for the project target; this is @@ -2843,7 +2746,6 @@ properties. This is only utilized if the \l{VERSION} or \l{RC_ICONS} variable is set and the \l{RC_FILE} and \l{RES_FILE} variables are not set. - \target QMAKE_TARGET_COPYRIGHT \section1 QMAKE_TARGET_COPYRIGHT Windows only. Specifies the copyright information for the project target; @@ -2852,7 +2754,6 @@ \l{RC_ICONS} variable is set and the \l{RC_FILE} and \l{RES_FILE} variables are not set. - \target QMAKE_TARGET_PRODUCT \section1 QMAKE_TARGET_PRODUCT Windows only. Specifies the product for the project target; this is used @@ -2860,7 +2761,6 @@ This is only utilized if the \l{VERSION} or \l{RC_ICONS} variable is set and the \l{RC_FILE} and \l{RES_FILE} variables are not set. - \target QMAKE_TARGET_ORIGINAL_FILENAME \section1 QMAKE_TARGET_ORIGINAL_FILENAME Windows only. Specifies the original file name for the project target; @@ -2869,7 +2769,6 @@ \l{RC_ICONS} variable is set and the \l{RC_FILE} and \l{RES_FILE} variables are not set. - \target QMAKE_TARGET_INTERNALNAME \section1 QMAKE_TARGET_INTERNALNAME Windows only. Specifies the internal name for the project target; this is @@ -2877,7 +2776,6 @@ properties. This is only utilized if the \l{VERSION} or \l{RC_ICONS} variable is set and the \l{RC_FILE} and \l{RES_FILE} variables are not set. - \target QMAKE_TARGET_COMMENTS \section1 QMAKE_TARGET_COMMENTS Windows only. Specifies the comments for the project target; this is @@ -2885,7 +2783,6 @@ properties. This is only utilized if the \l{VERSION} or \l{RC_ICONS} variable is set and the \l{RC_FILE} and \l{RES_FILE} variables are not set. - \target QMAKE_TARGET_TRADEMARKS \section1 QMAKE_TARGET_TRADEMARKS Windows only. Specifies the trademark information for the project target; @@ -2894,7 +2791,6 @@ \l{RC_ICONS} variable is set and the \l{RC_FILE} and \l{RES_FILE} variables are not set. - \target QMAKE_MANIFEST \section1 QMAKE_MANIFEST Windows only. Specifies the manifest file for the project target. @@ -2995,22 +2891,18 @@ shared/dynamic build of Qt, or when linking libraries. It may be used for deployment of dynamic plugins at a later time. - \target QT_VERSION_variable \section1 QT_VERSION Contains the current version of Qt. - \target QT_MAJOR_VERSION \section1 QT_MAJOR_VERSION Contains the current major version of Qt. - \target QT_MINOR_VERSION \section1 QT_MINOR_VERSION Contains the current minor version of Qt. - \target QT_PATCH_VERSION \section1 QT_PATCH_VERSION Contains the current patch version of Qt. @@ -3020,14 +2912,12 @@ Windows only. Specifies the name of the Windows resource file (.rc) for the target. See \l{Adding Windows Resource Files}. - \target RC_CODEPAGE \section1 RC_CODEPAGE Windows only. Specifies the codepage that should be specified in a generated .rc file. This is only utilized if the \l{VERSION} or \l{RC_ICONS} variable is set and the \l{RC_FILE} and \l{RES_FILE} variables are not set. - \target RC_DEFINES \section1 RC_DEFINES Windows only. qmake adds the values of this variable as RC preprocessor macros @@ -3035,7 +2925,6 @@ \snippet code/doc_src_qmake-manual.pro 186 - \target RC_ICONS \section1 RC_ICONS Windows only. Specifies the icons that should be included into a generated @@ -3043,7 +2932,6 @@ are not set. More details about the generation of .rc files can be found in the \l{Platform Notes}. - \target RC_LANG \section1 RC_LANG Windows only. Specifies the language that should be specified in a generated @@ -3054,7 +2942,6 @@ Specifies include paths that are passed to the Windows Resource Compiler. - \target RCC_DIR \section1 RCC_DIR Specifies the directory for Qt Resource Compiler output files. @@ -3063,7 +2950,6 @@ \snippet code/doc_src_qmake-manual.pro 48 - \target REQUIRES \section1 REQUIRES Specifies a list of values that are evaluated as conditions. If any of the conditions is false, @@ -3072,7 +2958,6 @@ \note We recommend using the \l{requires(condition)}{requires()} function instead if you want to skip projects or subprojects when building. - \target RESOURCES \section1 RESOURCES Specifies the name of the resource collection files (qrc) @@ -3088,7 +2973,6 @@ qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target SOURCES \section1 SOURCES Specifies the names of all source files in the project. @@ -3099,7 +2983,6 @@ See also \l{#HEADERS}{HEADERS}. - \target SUBDIRS \section1 SUBDIRS This variable, when used with the \c subdirs \l{#TEMPLATE}{template} @@ -3161,7 +3044,6 @@ \snippet code/doc_src_qmake-manual.pro 149 - \target TARGET \section1 TARGET Specifies the name of the target file. Contains the base name of the project @@ -3194,7 +3076,6 @@ qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. - \target TEMPLATE \section1 TEMPLATE Specifies the name of the template to use when generating the project. The @@ -3231,7 +3112,6 @@ determine how the project is built, it is necessary to declare TEMPLATE on the command line rather than use the \c -t option. - \target TRANSLATIONS \section1 TRANSLATIONS Specifies a list of translation (.ts) files that contain @@ -3249,7 +3129,6 @@ See the \l{Qt Linguist Manual} for more information about internationalization (i18n) and localization (l10n) with Qt. - \target UI_DIR \section1 UI_DIR Specifies the directory where all intermediate files from uic @@ -3259,7 +3138,6 @@ \snippet code/doc_src_qmake-manual.pro 54 - \target VERSION \section1 VERSION Specifies the version number of the application if the \c app @@ -3310,7 +3188,6 @@ See also \l{#DEPENDPATH}{DEPENDPATH}. - \target WINDOWS_TARGET_PLATFORM_VERSION \section1 WINDOWS_TARGET_PLATFORM_VERSION Specifies the targeted Windows version; this corresponds to the tag @@ -3319,7 +3196,6 @@ On desktop Windows, the default value is the value of the environment variable \c{WindowsSDKVersion}. - \target WINDOWS_TARGET_PLATFORM_MIN_VERSION \section1 WINDOWS_TARGET_PLATFORM_MIN_VERSION Specifies the minimum version of the Windows target platform; this @@ -3327,7 +3203,6 @@ Defaults to \c{WINDOWS_TARGET_PLATFORM_VERSION}. - \target YACCSOURCES \section1 YACCSOURCES Specifies a list of Yacc source files to be included @@ -3407,7 +3282,6 @@ \snippet code/doc_src_qmake-manual.pro 59 - \target qmake-cat \section2 cat(filename[, mode]) Returns the contents of \c filename. You can specify the following options @@ -3459,7 +3333,6 @@ \snippet code/doc_src_qmake-manual.pro 173 - \target findfunction \section2 find(variablename, substr) Returns all the values in \c variablename that match the regular expression @@ -3475,7 +3348,6 @@ Expands the specified wildcard pattern and returns a list of filenames. If \c recursive is true, this function descends into subdirectories. - \target fn_first \section2 first(variablename) Returns the first value of \c variablename. @@ -3484,9 +3356,9 @@ \snippet code/doc_src_qmake-manual.pro 161 - See also \l{take_first()}, \l{fn_last}{last()}. + See also \l{take_first(variablename)}{take_first()}, + \l{last(variablename)}{last()}. - \target format_number() \section2 format_number(number[, options...]) Returns \c number in the format specified by \c options. You can specify the @@ -3537,7 +3409,6 @@ to empty strings. If you need to encode spaces in \c glue, \c before, or \c after, you must quote them. - \target fn_last \section2 last(variablename) Returns the last value of \c variablename. @@ -3546,7 +3417,8 @@ \snippet code/doc_src_qmake-manual.pro 162 - See also \l{take_last()}, \l{fn_first}{first()}. + See also \l{take_last(variablename)}{take_last()}, + \l{first(variablename)}{first()}. \section2 list(arg1 [, arg2 ..., argn]) @@ -3567,7 +3439,6 @@ See also \l{upper(arg1 [, arg2 ..., argn])}{upper()}. - \target member() \section2 member(variablename [, start [, end]]) Returns the slice of the list value of \c variablename with the @@ -3594,9 +3465,8 @@ that an empty list will be returned only when an index is invalid (which is implied by the input variable being empty). - See also \l{str_member()}. + See also \l{str_member(arg [, start [, end]])}{str_member()}. - \target num_add() \section2 num_add(arg1 [, arg2 ..., argn]) Takes an arbitrary number of numeric arguments and adds them up, @@ -3728,12 +3598,11 @@ See also \l{system_quote(arg)}{system_quote()}. - \target fn_size \section2 size(variablename) Returns the number of values of \c variablename. - See also \l{str_size()}. + See also \l{str_size(arg)}{str_size()}. \section2 sort_depends(variablename, prefix) @@ -3747,7 +3616,8 @@ in ascending ASCII order. Numerical sorting can be accomplished by zero-padding the values to - a fixed length with the help of the \l{format_number()} function. + a fixed length with the help of the + \l{format_number(number[, options...])}{format_number()} function. This function was introduced in Qt 5.8. @@ -3765,12 +3635,11 @@ Replaces %1-%9 in \c string with the arguments passed in the comma-separated list of function \c arguments and returns the processed string. - \target str_member() \section2 str_member(arg [, start [, end]]) - This function is identical to \l{member()}, except that it operates - on a string value instead of a list variable, and consequently the - indices refer to character positions. + This function is identical to \l{member(variablename [, start [, end]])} + {member()}, except that it operates on a string value instead of a list + variable, and consequently the indices refer to character positions. This function can be used to implement many common string slicing operations: @@ -3795,20 +3664,19 @@ \note In these implementations, a zero \c len argument needs to be handled separately. - See also \l{member()}, \l{num_add()}. + See also \l{member(variablename [, start [, end]])}{member()}, + \l{num_add(arg1 [, arg2 ..., argn])}{num_add()}. This function was introduced in Qt 5.8. - \target str_size() \section2 str_size(arg) Returns the number of characters in the argument. - See also \l{fn_size}{size()}. + See also \l{size(variablename)}{size()}. This function was introduced in Qt 5.8. - \target system_replace \section2 system(command[, mode[, stsvar]]) You can use this variant of the \c system function to obtain stdout from the @@ -3818,9 +3686,10 @@ \snippet code/doc_src_qmake-manual.pro 72 - Like \l {qmake-cat}{$$cat()}, the \a mode argument takes \c blob, \c lines, - \c true, and \c false as value. However, the legacy word splitting rules - (i.e. empty or \c true, and \c false) differ subtly. + Like \l {cat(filename[, mode])}{$$cat()}, the \a mode argument takes + \c blob, \c lines, \c true, and \c false as value. However, the legacy + word splitting rules (i.e. empty or \c true, and \c false) differ + subtly. If you pass \c stsvar, the command's exit status will be stored in that variable. If the command crashes, the status will be -1, otherwise a @@ -3849,7 +3718,6 @@ See also \l{shell_quote(arg)}{shell_quote()}. - \target take_first() \section2 take_first(variablename) Returns the first value of \c variablename and removes it from the @@ -3859,9 +3727,9 @@ This function was introduced in Qt 5.8. - See also \l{take_last()}, \l{fn_first}{first()}. + See also \l{take_last(variablename)}{take_last()}, + \l{first(variablename)}{first()}. - \target take_last() \section2 take_last(variablename) Returns the last value of \c variablename and removes it from the @@ -3871,9 +3739,9 @@ This function was introduced in Qt 5.8. - See also \l{take_first()}, \l{fn_last}{last()}. + See also \l{take_first(variablename)}{take_first()}, + \l{last(variablename)}{last()}. - \target unique \section2 unique(variablename) Returns the list of values in \c variablename with duplicate entries removed. @@ -3951,7 +3819,6 @@ appropriate files are added to the \l{SOURCES} and \l{HEADERS} variables. - \target countfunction \section2 count(variablename, number) Succeeds if the variable \c variablename contains a list with the @@ -4030,7 +3897,6 @@ Exports the current value of \c variablename from the local context of a function to the global context. - \target forfunction \section2 for(iterate, list) Starts a loop that iterates over all values in \c list, setting \c iterate to each @@ -4175,9 +4041,9 @@ \snippet code/doc_src_qmake-manual.pro 71 - See also the replace variant of \l{system_replace}{system()}. + See also the replace variant of \l{system(command[, mode[, stsvar]])} + {system()}. - \target touchfunction \section2 touch(filename, reference_filename) Updates the time stamp of \c filename to match the time stamp of @@ -4396,7 +4262,6 @@ \snippet code/doc_src_qmake-manual.pro 78 - \target QMAKESPEC \section1 QMAKESPEC qmake requires a platform and compiler @@ -4420,7 +4285,6 @@ \note The \c QMAKESPEC path will be automatically added to the generated Makefile after the contents of the \l{INCLUDEPATH} system variable. - \target cache \section1 Cache File The cache file is a special file qmake reads to @@ -4433,7 +4297,6 @@ If qmake finds a \c{.qmake.cache} file then it will process this file first before it processes the project file. - \target Extensions \section1 File Extensions Under normal circumstances qmake will try to @@ -4454,7 +4317,7 @@ \li \l{QMAKE_EXT_UI} modifies the extension used for \QD UI files (usually in \l{FORMS}). \li \l{QMAKE_EXT_PRL} modifies the extension placed on - \l{LibDepend}{library dependency files}. + \l{Library Dependencies}{library dependency files}. \li \l{QMAKE_EXT_LEX} changes the suffix used in Lex files (usually in \l{LEXSOURCES}). \li \l{QMAKE_EXT_YACC} changes the suffix used in Yacc files (usually in @@ -4535,8 +4398,8 @@ \snippet code/doc_src_qmake-manual.pro 92 In the above line, \c USE_MY_STUFF will only be added to the list of pre-processor - defines if it is not already defined. Note that the \l{unique}{unique()} - function can also be used to ensure that a variable only contains one + defines if it is not already defined. Note that the \l{unique(variablename)} + {unique()} function can also be used to ensure that a variable only contains one instance of each value. \section2 Replacing Values @@ -4595,7 +4458,6 @@ \snippet code/doc_src_qmake-manual.pro 101 - \target Scopes \section1 Scopes Scopes are similar to \c if statements in procedural programming languages. @@ -4722,7 +4584,6 @@ You can test for any other platform-compiler combination as long as a specification exists for it in the \c mkspecs directory. - \target UsingVariables \section1 Variables Many of the variables used in project files are special variables that @@ -4755,7 +4616,6 @@ \snippet code/doc_src_qmake-manual.pro 100 - \target UsingReplaceFunctions \section1 Replace Functions qmake provides a selection of built-in @@ -4781,7 +4641,6 @@ \snippet qmake/replacefunction.pro 0 - \target UsingTestFunctions \section1 Test Functions qmake provides built-in functions that can be @@ -5100,7 +4959,6 @@ to be linked in. \endtable - \target LibDepend \section1 Library Dependencies Often when linking against a library, qmake @@ -5154,7 +5012,6 @@ \previouspage Advanced Usage \nextpage Configuring qmake - \target Introduction Precompiled headers (PCH) are a performance feature supported by some compilers to compile a stable body of code, and store the compiled @@ -5183,7 +5040,6 @@ \endlist \endlist - \target ADD_PCH \section1 Adding Precompiled Headers to Your Project The precompiled header must contain code which is \e stable @@ -5196,7 +5052,6 @@ C++ includes, since the precompiled header file for C files may not contain C++ code. - \target PROJECT_OPTIONS \section2 Project Options To make your project use precompiled headers, you only need to define the @@ -5236,7 +5091,6 @@ To avoid potential conflicts like these, give distinctive names to header files that will be precompiled. - \target EXAMPLE_PROJECT \section1 Example Project You can find the following source code in the @@ -5550,7 +5404,6 @@ Platform-specific variables are not described here. For more information, see \l{Qt for Windows - Deployment} and \l{Qt for macOS}. - \target Application \section1 Building an Application The \c app template tells qmake to generate a @@ -5670,7 +5523,6 @@ The only primary requirement is that the test program exit with a zero exit code on success, and a non-zero exit code on failure. - \target Library \section1 Building a Library The \c lib template tells qmake to generate a Makefile that will build a @@ -5699,7 +5551,6 @@ X11, \macos, and iOS, the library name will be prefixed by \c lib. On Windows, no prefix is added to the file name. - \target Plugin \section1 Building a Plugin Plugins are built using the \c lib template, as described in the previous