[cmake-developers] [PATCH] FindPythonLibs patches for version searching and frameworks

David Gobbi david.gobbi at gmail.com
Thu Sep 17 13:47:22 EDT 2015


On Thu, Sep 17, 2015 at 11:45 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> On Thu, Sep 17, 2015 at 11:25 AM, David Gobbi <david.gobbi at gmail.com>
> wrote:
>
>> On Thu, Sep 17, 2015 at 10:59 AM, Clinton Stimpson <clinton at elemtech.com>
>> wrote:
>>
>>>
>>> However, it does bother me that it found includes from the SDK and a
>>> library
>>> under /usr/lib.
>>>
>>> For example, if I use the 10.6 SDK on OS X 10.7, it appears that it
>>> would find
>>> /usr/lib/libpython.2.7.dylib and headers for python 2.6 under the 10.6
>>> SDK.
>>>
>>> I guess I can put this in the bug tracker.
>>>
>>
>> It's doing this even after my most recent set of patches?  The version
>> mismatch
>> issue is specifically what one of my patches was meant to fix.
>>
>
> Well, actually, I can guess why this might happen.  If you don't ask for a
> specific version of the libs, then it searches in order from the highest
> version
> to the lowest.  So it finds 2.7 first, which is not in the SDK.  But if
> you have
>

Typo: this should say "But if you have no headers..."

headers for 2.7 either in the root or in the SDK, it ends up finding the
> headers
> for 2.6 instead.
>
> Some logic could be added to FindPythonLibs.cmake so that it continues
> counting down the version number until it finds both a library and an
> include
> directory that have matching version numbers (that last bit is what is
> currently
> missing from the "break" condition in the count-down loop).  Do you want to
> give it a try?
>
>  - David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150917/bbe0b34b/attachment.html>


More information about the cmake-developers mailing list