summaryrefslogtreecommitdiffstats
path: root/qmake/doc/src/qmake-manual.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/doc/src/qmake-manual.qdoc')
-rw-r--r--qmake/doc/src/qmake-manual.qdoc140
1 files changed, 128 insertions, 12 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index b07ded3888..1a779a94b4 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -907,9 +907,9 @@
Platform-specific variables follow the naming pattern of the
variables which they extend or modify, but include the name of the relevant
- platform in their name. For example, \c QMAKE_LIBS can be used to specify a list
- of libraries that a project needs to link against, and \c QMAKE_LIBS_X11 can be
- used to extend or override this list.
+ platform in their name. For example, a makespec may use \c QMAKE_LIBS
+ 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 CONFIG
\section1 CONFIG
@@ -956,14 +956,36 @@
default is used.
\row \li thread \li Thread support is enabled. This is enabled when CONFIG
includes \c qt, which is the default.
+ \row \li c99 \li C99 support is enabled. This option has no effect if
+ the compiler does not support C99, or can't select the C standard.
+ By default, the compiler default is used.
+ \row \li c11 \li C11 support is enabled. This option has no effect if
+ the compiler does not support C11, or can't select the C standard.
+ By default, the compiler default is used.
+ \row \li strict_c \li Disables support for C compiler extensions.
+ By default, they are enabled.
\row \li c++11 \li C++11 support is enabled. This option has no effect if
- the compiler does not support C++11.
- By default, support is disabled.
+ the compiler does not support C++11, or can't select the C++ standard.
+ By default, support is enabled.
\row \li c++14 \li C++14 support is enabled. This option has no effect if
- the compiler does not support C++14.
+ the compiler does not support C++14, or can't select the C++ standard.
+ By default, the compiler default is used.
+ \row \li c++1z \li C++17 support is enabled. This option has no effect if
+ the compiler does not support C++17, or can't select the C++ standard.
By default, support is disabled.
+ \row \li c++17 \li Same as c++1z.
+ \row \li strict_c++ \li Disables support for C++ compiler extensions.
+ By default, they are enabled.
\row \li depend_includepath \li Appending the value of INCLUDEPATH to
DEPENDPATH is enabled. Set by default.
+ \row \li lrelease \li Run \c lrelease for all files listed in
+ \l TRANSLATIONS and \l EXTRA_TRANSLATIONS. If \c embed_translations
+ is not set, install the generated .qm files into
+ QM_FILES_INSTALL_PATH. Use QMAKE_LRELEASE_FLAGS to add options to
+ the lrelease call. Not set by default.
+ \row \li embed_translations \li Embed the generated translations from
+ \c lrelease in the executable, under \l{QM_FILES_RESOURCE_PREFIX}.
+ Requires \c lrelease to be set, too. Not set by default.
\endtable
When you use the \c debug_and_release option (which is the default under
@@ -1149,6 +1171,24 @@
Specifies where to copy the \l{#TARGET}{target} dll.
+ \target EXTRA_TRANSLATIONS
+ \section1 EXTRA_TRANSLATIONS
+
+ Specifies a list of translation (.ts) files that contain
+ translations of the user interface text into non-native languages.
+
+ In contrast to \l TRANSLATIONS, translation files in \c EXTRA_TRANSLATIONS
+ will be processed only by \l{Using lrelease}{lrelease}, not
+ \l{Using lupdate}{lupdate}.
+
+ You can use \l{CONFIG}{CONFIG += lrelease} to automatically compile the
+ files during the build, and
+ \l{CONFIG}{CONFIG += lrelease embed_translations} to make them available in
+ \l{The Qt Resource System}.
+
+ See the \l{Qt Linguist Manual} for more information about
+ internationalization (i18n) and localization (l10n) with Qt.
+
\target FORMS
\section1 FORMS
@@ -1281,6 +1321,19 @@
\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.
+ The behavior of this variable is identical to \l LIBS, except that
+ shared library projects built for Unix do not expose these dependencies
+ in their link interface.
+
+ The effect of this is that if project C depends on library B which
+ depends on library A privately, but C also wants to use symbols from A
+ 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
@@ -1419,6 +1472,21 @@
\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
+ be made available by \l{CONFIG}{CONFIG += embed_translations}.
+
+ 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 QMAKE_systemvariable
\section1 QMAKE
@@ -1994,7 +2062,19 @@
\section1 QMAKE_LIBDIR
- Specifies a list of system library paths.
+ Specifies a list of library search paths for all projects.
+ The value of this variable is typically handled by qmake
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ To specify additional search paths in project files,
+ use \l LIBS like that, instead:
+ \badcode
+ LIBS += -L/path/to/libraries
+ \endcode
+
+ \section1 QMAKE_LIBDIR_POST
+
+ Specifies a list of system library search paths for all projects.
The value of this variable is typically handled by qmake
or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
@@ -2044,10 +2124,22 @@
\section1 QMAKE_LIBS
- Specifies all project libraries. The value of this variable
- is typically handled by qmake or
+ Specifies additional libraries each project needs to link against.
+ The value of this variable is typically handled by qmake or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ To specify libraries in a project file, use \l LIBS instead.
+
+ \section1 QMAKE_LIBS_PRIVATE
+
+ Specifies additional private libraries each project needs to
+ link against.
+ The value of this variable is typically handled by qmake or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+
+ To specify private libraries in a library project file,
+ use \l LIBS_PRIVATE instead.
+
\section1 QMAKE_LIBS_EGL
Specifies all EGL libraries when building Qt with OpenGL/ES
@@ -2134,6 +2226,12 @@
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
+ enabled through \l{CONFIG}{CONFIG += lrelease}.
+
\section1 QMAKE_OBJECTIVE_CFLAGS
Specifies the Objective C/C++ compiler flags for building
@@ -2342,9 +2440,7 @@
This variable is used to customize the list of options passed to the
\l{uic}{User Interface Compiler} in each of the build rules where it is
- used. For example, \c{-no-stringliteral} can be passed to use QLatin1String
- instead of QStringLiteral in generated code (which is the default for
- dynamic libraries).
+ used.
\section1 QMAKE_WATCHOS_DEPLOYMENT_TARGET
@@ -2613,11 +2709,21 @@
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
translations of the user interface text into non-native languages.
+ Translation files in \c TRANSLATIONS will be processed by both
+ \l{Using lrelease}{lrelease} and \l{Using lupdate} tools. Use
+ \l EXTRA_TRANSLATIONS if you want only \c lrelease to process a file.
+
+ You can use \l{CONFIG}{CONFIG += lrelease} to automatically compile the
+ files during the build, and
+ \l{CONFIG}{CONFIG += lrelease embed_translations} to make them available in
+ \l{The Qt Resource System}.
+
See the \l{Qt Linguist Manual} for more information about
internationalization (i18n) and localization (l10n) with Qt.
@@ -2932,6 +3038,7 @@
\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
@@ -3298,6 +3405,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 \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
non-negative exit code of the command's choosing. Usually, comparing
@@ -4511,6 +4622,11 @@
\li The dependencies for the output only get generated from the depends
member and from nowhere else.
\row
+ \li dep_lines
+ \li The output from the .depend_command is interpreted to be one file
+ per line. The default is to split on whitespace and is maintained
+ only for backwards compatibility reasons.
+ \row
\li no_link
\li Indicates that the output should not be added to the list of objects
to be linked in.