Solution and a patch! (was Re: [CMake] FIND_LIBRARY and OS X Frameworks)

Tanner Lovelace clubjuggler at gmail.com
Fri Mar 31 16:46:35 EST 2006


On 3/31/06, Tanner Lovelace <clubjuggler at gmail.com> wrote:
> On 3/31/06, Tanner Lovelace <clubjuggler at gmail.com> wrote:
>
> > Obviously there's something converting from the framework directory path
> > to the framework parameters (-F/path/to/framework -framework A) and there's
> > also something converting from a library path to library parameters (-lz -lbz2).
> > It almost looks like only one of these routines is being run to create the
> > link line and since the frameworks are first the one to convert library
> > paths to library parameters isn't getting called.  Does this sound feasible?
>
> I think I may have found the bug.  In cmOrderLinkDirectories.cxx in the
> function cmOrderLinkDirectories::DetermineLibraryPathOrder() there is
> a boolean variable called framework.   It is set to false before processing
> through the list of library files.  If the loop finds a framework, it sets this
> to true, however, it never again gets set to false.  Further down in the loop,
> after checking for frameworks, I think is the code to handle library path
> translation to link parameters and it is surrounded by a
>
> if (!framework) {}
>
> statement.  I believe the call to set framework to false should be put
> just inside the for loop instead of outside it so that the framework
> boolean value is reset for each item in the list.  I'll see if I can verify this
> but can someone who knows this code please double check this for me?
>
> Thanks much!

I have opened bug #3067 for this and attached a patch to correct it:

http://www.cmake.org/Bug/bug.php?op=show&bugid=3067&pos=0

I have verified that by applying my patch, libraries are correctly added
to the link line along with frameworks.  Please apply.

Cheers,
Tanner
--
Tanner Lovelace
clubjuggler at gmail dot com
http://wtl.wayfarer.org/
(fieldless) In fess two roundels in pale, a billet fesswise and an
increscent, all sable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake-framework-library.patch
Type: application/octet-stream
Size: 913 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060331/566fe3c4/cmake-framework-library.obj


More information about the CMake mailing list