1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
/****************************************************************************
**
** 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}
*/
/*!
\qmlproperty string Exporter.pkgconfig::customVariables
Use this property to add arbitrary variable assignments into the \c .pc file.
The property is a map that will produce one assignment per entry.
The keys and values of the map represent the left-hand sides and right-hand
sides of these assignments, respectively. The values are strings that will
be written into the file verbatim.
\nodefaultvalue
*/
|