diff options
author | Robin Burchell <robin.burchell@collabora.co.uk> | 2011-01-17 12:31:44 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2011-01-17 12:31:44 (GMT) |
commit | a13e97b42c89159667f2d89c7eda2dbfdf1465e8 (patch) | |
tree | 69156ba854317007a63436f2bc26fb9252756479 /doc | |
parent | 32f3fcd9ab19f66cb435e6a8830ce54ccf13885a (diff) | |
download | Qt-a13e97b42c89159667f2d89c7eda2dbfdf1465e8.zip Qt-a13e97b42c89159667f2d89c7eda2dbfdf1465e8.tar.gz Qt-a13e97b42c89159667f2d89c7eda2dbfdf1465e8.tar.bz2 |
Add packagesExist() function to qmake.
This can be used to detect whether or not a given (set of) packages exist,
which can be useful for compiling in or our extra functionality at build time.
Merge-request: 1022
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/development/qmake-manual.qdoc | 13 | ||||
-rw-r--r-- | doc/src/snippets/code/doc_src_qmake-manual.qdoc | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index d7a48a3..b6270d5 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -3397,6 +3397,19 @@ \tableofcontents{2} + \section1 packagesExist(packages) + + Uses the PKGCONFIG mechanism to determine whether or not the given packages + exist at the time of project parsing. + + This can be useful to optionally enable or disable features. For example: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 157 + + And then, in the code: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 158 + \section1 basename(variablename) Returns the basename of the file specified. For example: diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc index ab67a3d..ec35a52 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc +++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc @@ -1029,3 +1029,15 @@ DEPLOYMENT += dep_note //! [156] DEPLOYMENT.display_name = My Qt App //! [156] + +//! [157] +packagesExist(sqlite3 QtNetwork QtDeclarative) { + DEFINES += USE_FANCY_UI +} +//! [157] + +//! [158] +#ifdef USE_FANCY_UI + // Use the fancy UI, as we have extra packages available +#endif +//! [158] |