Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
1.7.0
-
None
-
Linux, gcc 5.4.0
-
6f7ad4f7efed8b41e6eb75bca3132a7ffdbff461
Description
PkgConfigProbe returns raw libs output of pkg-config, which includes "-l" prefix on link library dependencies. So it can't be (easily) used with cpp.staticLibraries.
A work-around is to use cpp.linkerFlags instead. But that results in linking the libraries before the using artifacts, so they are liable to be discarded (by gcc --as-needed) causing link to fail.
I suggest PkgConfigProbe should strip the "-l" prefix so that idiomatic form becomes:
qbs.Probes.PkgConfigProbe {id: foo; name: "bar" }
cpp.cxxFlags: foo.cflags
cpp.staticLibraries: foo.libs
Attachments
For Gerrit Dashboard: QBS-1097 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
182949,2 | PkgConfigProbe: Provide higher-level output properties | master | qbs/qbs | Status: MERGED | +2 | 0 |