On Fri, May 9, 2008 at 4:12 PM, Alexander Neundorf <<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Friday 09 May 2008, Philip Lowman wrote:<br>
> Should the pkg_check_modules() included with CMake 2.6.0 in<br>
> FindPkgConfig.cmake return full path declarations for <XPREFIX>_LIBRARIES<br>
> and <XPREFIX>_STATIC_LIBRARIES instead of just NameA;NameB;NameC ?<br>
><br>
> This would make an extremely useful feature in my book in trying to port<br>
> stuff to CMake <a href="http://2.6.0." target="_blank">2.6.0.</a> Anyone else agree?<br>
<br>
</div></div>Yes, I do.</blockquote><div><br>I implemented it. I could use feedback and testing. It seems to work fine for me and plays very nicely with CMake's new file-extension based find_library support and full path target_link_libraries support. Here are the changes:<br>
<br>1. <XPREFIX>_LIBRARIES is now <XPREFIX>_LIBRARIES_NOPATHS.<br><br>2. Full paths for <XPREFIX>_LIBRARIES_NOPATHS are calculated. For each library in the linking list, find_library() is used to create an advanced cache variable to attempt to find said library.<br>
<br>3. First <XPREFIX>_LIBRARY_DIRS is searched with NO_DEFAULT_PATH, then the CMake system path (/lib, /usr/lib, whatever). Variables like CMAKE_LIBRARY_PATH are ignored right now (rationale is to prevent picking stuff not dictated by the pkgconfig path).<br>
<br>4. If a full path to a library is found, it gets placed in <XPREFIX>_LIBRARIES<br><br>5. If a full path to a library is _not_ found a warning is issued and the plain library name is substituted into <XPREFIX>_LIBRARIES<br>
<br>6. Ditto for <XPREFIX>_STATIC_LIBRARIES<br></div></div><br>-- <br>Philip Lowman