aboutsummaryrefslogtreecommitdiffstats
path: root/doc/reference
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-03-06 10:47:29 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2018-06-04 13:03:13 +0000
commitb3e1e3e3b307e60924dcf3cf308488a362de88f0 (patch)
treecd0ee0824eba2693198681ee587b691ee5e28e50 /doc/reference
parent400d9e1d66aacb2760b2190a5f10cfc3d5d359d2 (diff)
Add module Exporter.pkgconfig
This module generates .pc files for products, optionally attempting to derive some of the entries from the contents of the Export item. [ChangeLog] Added new module "Exporter.pkgconfig" for creating pkg- config metadata files. Task-number: QBS-1232 Change-Id: Ic41e645e4462e8f85ad6c2025fb967e88d3438f9 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'doc/reference')
-rw-r--r--doc/reference/items/language/export.qdoc2
-rw-r--r--doc/reference/modules/exporter-pkgconfig-module.qdoc198
2 files changed, 200 insertions, 0 deletions
diff --git a/doc/reference/items/language/export.qdoc b/doc/reference/items/language/export.qdoc
index 3c89117e9..d8ed4c33d 100644
--- a/doc/reference/items/language/export.qdoc
+++ b/doc/reference/items/language/export.qdoc
@@ -91,5 +91,7 @@
\endcode
\defaultvalue \c undefined
+ \see Exporter.qbs
+ \see Exporter.pkgconfig
\since 1.12
*/
diff --git a/doc/reference/modules/exporter-pkgconfig-module.qdoc b/doc/reference/modules/exporter-pkgconfig-module.qdoc
new file mode 100644
index 000000000..29672fb21
--- /dev/null
+++ b/doc/reference/modules/exporter-pkgconfig-module.qdoc
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qbs.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \contentspage index.html
+ \qmltype Exporter.pkgconfig
+ \inqmlmodule QbsModules
+ \since Qbs 1.12
+
+ \brief Provides support for generating pkg-config files.
+
+ The \c Exporter.pkgconfig module contains the properties and rules to create a
+ \l{https://www.freedesktop.org/wiki/Software/pkg-config}{pkg-config}
+ metadata (\c{.pc}) file for a \l Product.
+
+ By default, \QBS will attempt to derive some of the \c {.pc} file's contents from
+ the product's \l Export item. This behavior can be suppressed by setting the
+ \l autoDetect property to \c false.
+
+ \section2 Relevant File Tags
+ \target filetags-exporter-pkgconfig
+
+ \table
+ \header
+ \li Tag
+ \li Since
+ \li Description
+ \row
+ \li \c{"Exporter.pkgconfig.pc"}
+ \li 1.12.0
+ \li This tag is attached to the generated \c{.pc} file.
+ \endtable
+*/
+
+/*!
+ \qmlproperty bool Exporter.pkgconfig::autoDetect
+
+ If this property is enabled, then \QBS will try to derive various \c {.pc} file
+ entries from the contents of the product's \l Export item, including the dependencies
+ declared therein. Values for these fields can still be explicitly provided via the
+ respective properties, in which case they will be concatenated with the auto-detected ones.
+ If an exported dependency is known to correspond to a pkg-config module (either by
+ pulling in the \c{Exporter.pkgconfig} module or by appearing in the \l requiresEntry
+ property), it will end up in the \c Requires field of the \c{.pc} file, otherwise
+ its exported \l cpp properties will be collected for use in the \c Cflags and \c Libs fields.
+ The \l excludedDependencies property can be used to ignore specific products altogether.
+
+ \defaultvalue \c true
+*/
+
+/*!
+ \qmlproperty stringList Exporter.pkgconfig::cflagsEntry
+
+ The value of the \c Cflags field in the \c {.pc} file.
+
+ If \l autoDetect is enabled, then this value will be appended to the flags derived from
+ the product's \l Export item and the dependencies declared therein.
+
+ \defaultvalue \c {[]}
+*/
+
+/*!
+ \qmlproperty stringList Exporter.pkgconfig::conflictsEntry
+
+ The value of the \c Conflicts field in the \c {.pc} file.
+
+ \defaultvalue \c {[]}
+*/
+
+/*!
+ \qmlproperty stringList Exporter.pkgconfig::excludedDependencies
+
+ If \l autoDetect is enabled, the entries of this property will be matched against
+ the product's exported dependencies. In case such a dependency's name is present in the array,
+ \QBS will not traverse that dependency to collect entries for the
+ \c Cflags, \c Libs, \c Requires and \c {Requires.private} fields.
+
+ This list must not contain any values that are present in \l requiresEntry.
+
+ \defaultvalue \c undefined
+*/
+
+/*!
+ \qmlproperty string Exporter.pkgconfig::fileName
+
+ The file name of the generated pkg-config metadata file.
+
+ \defaultvalue \c {product.targetName + ".pc"}
+*/
+
+/*!
+ \qmlproperty stringList Exporter.pkgconfig::libsEntry
+
+ The value of the \c Libs field in the \c {.pc} file.
+
+ If \l autoDetect is enabled, then this value will be appended to the flags derived from
+ the product's \l Export item and the dependencies declared therein.
+
+ \defaultvalue \c {[]}
+*/
+
+/*!
+ \qmlproperty stringList Exporter.pkgconfig::libsPrivateEntry
+
+ The value of the \c Libs.Private field in the \c {.pc} file.
+
+ \defaultvalue \c {[]}
+*/
+
+/*!
+ \qmlproperty string Exporter.pkgconfig::nameEntry
+
+ The value of the \c Name field in the \c {.pc} file.
+
+ \defaultvalue \c {product.name}
+*/
+
+
+/*!
+ \qmlproperty stringList Exporter.pkgconfig::requiresEntry
+
+ The value of the \c Requires field in the \c {.pc} file.
+
+ If \l autoDetect is enabled, then those of the product's exported dependencies
+ that pull in the \c {Exporter.pkgconfig} module will also end up in the
+ \c Requires field, provided they are not listed in \l excludedDependencies.
+
+ If an exported dependency matches an entry of this array, \QBS will not traverse that
+ dependency to gather \l cpp properties for use in the \l cflagsEntry and \l libsEntry values,
+ as pkg-config takes care of that itself.
+
+ \defaultvalue \c {[]}
+*/
+
+/*!
+ \qmlproperty stringList Exporter.pkgconfig::requiresPrivateEntry
+
+ The value of the \c Requires.private field in the \c {.pc} file.
+
+ If \l autoDetect is enabled, then those of the product's non-exported dependencies
+ that pull in the \c {Exporter.pkgconfig} module will also end up in the
+ \c Requires.private field, provided they are not listed in \l excludedDependencies.
+
+ \defaultvalue \c {[]}
+*/
+
+/*!
+ \qmlproperty var Exporter.pkgconfig::transformFunction
+
+ A function with the signature
+ \c {function(product, moduleName, propertyName, value)}.
+ This can be useful to "fine-tune" property values if \l autoDetect is enabled, in case
+ they need amending for the purpose of pkg-config.
+ The \c product parameter represents the exporting product, the remaining parameters describe
+ the module property. The modified value of the module property shall be returned.
+
+ \defaultvalue \c undefined
+*/
+
+/*!
+ \qmlproperty string Exporter.pkgconfig::urlEntry
+
+ The value of the \c URL field in the \c {.pc} file.
+
+ \defaultvalue \c undefined
+*/
+
+/*!
+ \qmlproperty string Exporter.pkgconfig::versionEntry
+
+ The value of the \c Version field in the \c {.pc} file.
+
+ \defaultvalue \c {product.version}
+*/