<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks Eike,<div><br></div><div>that helps, but I can't understand why it is necessary?</div><div><br></div><div>Within the trace message output there was no semicolon, see below.</div><div><br></div><div>My first try was this:</div><div><div>message(EXTRA_LIBS=${EXTRA_LIBS}) # => EXTRA_LIBS=/usr/lib/libpthread.dylib/usr/lib/libcrypto.dylib<span class="Apple-tab-span" style="white-space:pre">        </span># OK but no spaces</div><div>message(EXTRA_LIBS="${EXTRA_LIBS}") # >>>>>>>> EXTRA_LIBS=/usr/lib/libpthread.dylib;/usr/lib/libcrypto.dylib<span class="Apple-tab-span" style="white-space:pre">        </span># fault! with ';'</div><div><br></div><div>Than I changed my code and got this output:</div><div><br></div>
<br><div><div>On 28.06.2013, at 19:06, Rolf Eike Beer wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><blockquote type="cite"># ....<br class="Apple-interchange-newline"># trace<br></blockquote><blockquote type="cite">message( STATUS SNMP_PP_LIBS="${LIBS}")<br></blockquote><blockquote type="cite">message( STATUS SNMP_PP_LDFLAGS="${LINKFLAGS}")<br></blockquote><blockquote type="cite">#<br></blockquote><blockquote type="cite"># -- SNMP_PP_LIBS="-lpthread -lcrypto "<span class="Apple-tab-span" style="white-space:pre">        </span><<<<<<<<<<<<<<<<< OK, with spaces and no ';'<br></blockquote><blockquote type="cite"># -- SNMP_PP_LDFLAGS="-L/usr/lib "<br></blockquote><blockquote type="cite"># ...<br></blockquote><blockquote type="cite">## configure_file(snmp++-3.pc.in snmp++-3.pc @ONLY)<br></blockquote><blockquote type="cite"># -- Generating snmp++-3.pc file for pkg-config ...<br></blockquote><blockquote type="cite">#<br></blockquote><blockquote type="cite"># Libs.private: @LIBS@ @LINKFLAGS@<br></blockquote><blockquote type="cite"># ... expands to:<br></blockquote><blockquote type="cite"># Libs.private: -lpthread ;-lcrypto -L/usr/lib<br></blockquote><blockquote type="cite"># ^<br></blockquote><blockquote type="cite"># How can I prevent this?<br></blockquote><br>string(REPLACE ";" " " LIBS "${LIBS}")<br><br>Eike<br>--<span class="Apple-converted-space"> </span><br></div></blockquote></div><br></div><div><br></div><div>Is there a better way to create a pkg-config file?</div><div><br></div><div>IMHO, It would be nice if the FindPkgConfig.cmake module could create pc file too.</div><div><br></div><div>something like:</div><div><span class="Apple-tab-span" style="white-space:pre">        pkg_</span>create<span class="Apple-tab-span" style="white-space:pre">_module(<PREFIX> </span><PATH><span class="Apple-tab-span" style="white-space:pre"> [QUIET] <MODULE> )</span></div><div><br></div><div>it should be the <span class="Apple-style-span" style="font-family: Times; font-style: italic; ">reversed</span> function of:</div><div><span class="Apple-tab-span" style="white-space:pre">        pkg_search_module (</span>LIBXML<span class="Apple-tab-span" style="white-space:pre"> libxml2</span>)</div><div><br></div><div>Is this possible?</div><div><br></div><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>//Regards</div><div>Claus</div><div><br></div></div><br></div></div></body></html>