<div dir="ltr"><div>I've created a task for this here:<br><br>    <a href="https://bugreports.qt.io/browse/QBS-1105">https://bugreports.qt.io/browse/QBS-1105</a><br><br></div>What is the procedure for creating suggestion issues on JIRA - is it okay to just create one or is it best to ask questions on this list first ?  Specifically, I'm thinking about the way that PkgConfigProbe uses the PATH environment to find the pkg-config executable.  When cross compiling it would be more convenient for it to prepend the toolchain directory to the PATH so that the target version of pkg-config is used instead of the host version.  I was able to work around that by setting the executable property of the PkgConfigProbe item to point to the full path<span style="font-family:monospace,monospace"></span> but it would be much nicer if I didn't have to do that.  Is it worth creating a suggestion issue in JIRA for this or are there good reasons for not adding this behaviour ?<br><div><br>--<br></div><div>Glenn<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 15 February 2017 at 17:24, Christian Kandeler <span dir="ltr"><<a href="mailto:christian.kandeler@qt.io" target="_blank">christian.kandeler@qt.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 02/15/2017 02:51 AM, Glenn Coombs wrote:<br>
> I have created a custom module to help wrap a dependency on the<br>
> Qt5GStreamerUi library.  To use it I add a line like this:<br>
><br>
>     Depends { name: "Qt5GStreamerUi" }<br>
><br>
> to any project that needs to link against Qt5GStreamerUi.  It works fine<br>
> but I would like to make the module more generic so that I can add a<br>
> dependency on any library that pkg-config knows about.  I can't work out<br>
> how to pass the name of the library through to the custom module.  I want<br>
> to be able to write something like this:<br>
><br>
>     Depends { name: "PkgConfig"; packageName = "Qt5GStreamerUi" }<br>
><br>
> where PkgConfig would be the renamed and modified version of my existing<br>
> Qt5GStreamerUi module.  Is there a way to do this ?<br>
<br>
</span>Depends { name: "PkgConfig" }<br>
PkgConfig.packageName: "Qt5GStreamerUi"<br>
<br>
Of course, this is not a viable general-purpose solution, as it limits<br>
the PkgConfig module to one package per product.<br>
<br>
Making the package name a list has a bunch of other problems. Also, in<br>
the general case, you'd like to be able to find your library even if<br>
there is no pkg-config (e.g. have fallback values for the library name<br>
and look for it in well-known places), so usually you'll want a<br>
dedicated named module. Perhaps a noninstantiable PkgConfig module item<br>
would be the right solution; the concrete modules would then derive from it.<br>
<br>
Either way, pkg-config is important enough to warrant a dedicated JIRA<br>
task to discuss how to do it right. Feel free to open one.<br>
<br>
<br>
Christian<br>
______________________________<wbr>_________________<br>
Qbs mailing list<br>
<a href="mailto:Qbs@qt-project.org">Qbs@qt-project.org</a><br>
<a href="http://lists.qt-project.org/mailman/listinfo/qbs" rel="noreferrer" target="_blank">http://lists.qt-project.org/<wbr>mailman/listinfo/qbs</a><br>
</blockquote></div><br></div>