Re: [cmake-developers] [PATCH] FindOpenGL: Don't add AGL to OPENGL_LIBRARIES on OS X.

2015-12-14 Thread David Gobbi
On Mon, Dec 14, 2015 at 7:48 AM, Brad King <brad.k...@kitware.com> wrote:

> On 12/12/2015 02:12 PM, David Gobbi wrote:
> > CMake had been setting OPENGL_glu_LIBRARY to AGL.framework, even
> > though AGL is not GLU.  AGL is simply the GL component for the
> > deprecated Carbon framework.  GLU is provided by OpenGL.framework.
> >
> > A side effect of the old behavior was that if AGL was not found
> > (it is absent from OS X SDK 10.10 or later), then OPENGL_GLU_FOUND
> > would be incorrectly set to "NO".
>
> Thanks.  I'm not familiar with those roles myself so I've long wondered
> why we used AGL for GLU.  Applied:
>
>  FindOpenGL: Don't add AGL to OPENGL_LIBRARIES on OS X.
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=08580be2


Carbon + AGL are like x11 + glx and Windows + wgl.
Thanks for the quick reply.

 - David
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

[cmake-developers] [PATCH] FindOpenGL: Don't add AGL to OPENGL_LIBRARIES on OS X.

2015-12-12 Thread David Gobbi
CMake had been setting OPENGL_glu_LIBRARY to AGL.framework, even
though AGL is not GLU.  AGL is simply the GL component for the
deprecated Carbon framework.  GLU is provided by OpenGL.framework.

A side effect of the old behavior was that if AGL was not found
(it is absent from OS X SDK 10.10 or later), then OPENGL_GLU_FOUND
would be incorrectly set to "NO".


0001-FindOpenGL-Don-t-add-AGL-to-OPENGL_LIBRARIES-on-OS-X.patch
Description: Binary data
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-17 Thread David Gobbi
On Thu, Sep 17, 2015 at 9:32 AM, Brad King <brad.k...@kitware.com> wrote:

> On 09/17/2015 10:43 AM, David Gobbi wrote:
> > It finds the install prefix for PYTHON_EXECUTABLE
> > and uses it as a hint for the library location
>
> Thanks.  I revised the previous patch slightly to add a prefix to
> the _HINT temporary variable and unset it when finished:
>
>  FindPythonLibs: Match include dir to library version
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9d32dff
>
> Then I made the same tweak to this patch and applied it:
>
>  FindPythonLibs: Use python executable prefix as a hint
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f8bc4e11


Looks good.  The _PREFIX temporary variable is still lying around, though.
Is that a concern?

 - David
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-17 Thread David Gobbi
On Thu, Sep 17, 2015 at 9:46 AM, David Gobbi <david.go...@gmail.com> wrote:

> On Thu, Sep 17, 2015 at 9:08 AM, Clinton Stimpson <clin...@elemtech.com>
> wrote:
>
>>
>> Is that related to issues you are addressing here?
>>
>
> No, the prefix check was meant to fix things for people who use homebrew
> or other third-party package managers that have their own prefix.  It
> wasn't
> meant to address the SDK.
>

Okay, Clinton.  Now you've made me paranoid that I should be prepending
the value of CMAKE_OSX_SYSROOT before the prefix if it isn't already
part of the prefix.  I don't want to ignore CMAKE_OSX_SYSROOT if it has
been set, but unfortunately I don't know all the details of how find_library
uses CMAKE_OSX_SYSROOT internally.

 - David
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-17 Thread David Gobbi
On Thu, Sep 17, 2015 at 9:48 AM, Brad King  wrote:
>
>
> Please provide a follow-up patch I can squash in for that.
>

I've renamed the variable _PREFIX -> _Python_PREFIX and now the code
unsets it once it's finished with it.

 - David


0001-FindPythonLibs-unset-temporary-_PREFIX-variable.patch
Description: Binary data
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-17 Thread David Gobbi
On Thu, Sep 17, 2015 at 9:08 AM, Clinton Stimpson 
wrote:

>
> Hi,
>
> I did a quick test to see if my issue has been resolved.
>
> I have a CMakeLists.txt file with just:
> FIND_PACKAGE(PythonInterp REQUIRED)
> FIND_PACKAGE(PythonLibs ${PYTHON_VERSION_STRING} REQUIRED)
>
>
> And I get this error:
>   Could NOT find PythonLibs: Found unsuitable version "2.7.2", but required
>   is at least "2.7.5" (found /usr/lib/libpython2.7.dylib)
>
>
> The problem I have is that I get a python executable and python library
> from a
> system location, and headers from the SDK, which aren't the exact same
> version.
>
> //Path to a program.
> PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python
>
> //Path to a file.
>
> PYTHON_INCLUDE_DIR:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Python.framework/Headers
>
> //Path to a library.
> PYTHON_LIBRARY:FILEPATH=/usr/lib/libpython2.7.dylib
>
>
> Is that related to issues you are addressing here?
>

No, the prefix check was meant to fix things for people who use homebrew
or other third-party package managers that have their own prefix.  It wasn't
meant to address the SDK.

However, there should be a simple fix for your problem.   Just do the
following, to allow PythonLibs to apply its own logic for matching just the
major and minor version numbers (e.g. 2.7 instead of 2.7.5):

FIND_PACKAGE(PythonInterp REQUIRED)
FIND_PACKAGE(PythonLibs REQUIRED)

 - David
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-17 Thread David Gobbi
On Thu, Sep 17, 2015 at 7:44 AM, Brad King  wrote:

>
> Thanks, applied:
>
>  FindPythonLibs: Match include dir to library version
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89717916


This should be the last one.  It finds the install prefix for
PYTHON_EXECUTABLE
and uses it as a hint for the library location (on WIN32 it uses
${_prefix}/libs, on
other systems it uses ${_prefix}/lib).

 - David


0001-FindPythonLibs-Use-python-executable-prefix-as-a-hin.patch
Description: Binary data
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-17 Thread David Gobbi
On Thu, Sep 17, 2015 at 10:59 AM, Clinton Stimpson 
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.

 - David
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-17 Thread David Gobbi
On Thu, Sep 17, 2015 at 11:45 AM, David Gobbi <david.go...@gmail.com> wrote:

> On Thu, Sep 17, 2015 at 11:25 AM, David Gobbi <david.go...@gmail.com>
> wrote:
>
>> On Thu, Sep 17, 2015 at 10:59 AM, Clinton Stimpson <clin...@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
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-17 Thread David Gobbi
On Thu, Sep 17, 2015 at 11:25 AM, David Gobbi <david.go...@gmail.com> wrote:

> On Thu, Sep 17, 2015 at 10:59 AM, Clinton Stimpson <clin...@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
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
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-16 Thread David Gobbi
On Wed, Sep 16, 2015 at 7:03 AM, Brad King <brad.k...@kitware.com> wrote:

> On 09/15/2015 10:09 AM, David Gobbi wrote:
> > The first is trivial, it simply adds Python 3.5 and 3.6 to the search
> list.
> >
> > The second removes the long-deprecated PYTHON_INCLUDE_PATH as a
> suggestion
> > for PYTHON_INCLUDE_DIR.
>
> Thanks.  I've applied these two:
>
>  FindPython{Interp,Libs}: Add versions 3.5 and 3.6
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2db092b1
>
>  FindPythonLibs: Remove PYTHON_INCLUDE_PATH as input
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c57334fa
>
> > The third does two important things: 1) it fixes bugs for searching for
> > specific versions of the libs and headers for framework installs of
> > Python on OS X, and 2) it doesn't search for the include directory
> > until after library has been found, so that it can use the library
> > version to direct the search for the include directory.
>
> This patch conflicts with post-3.3 changes in CMake 'master'.  Please
> rebase on the above-applied commits and revise accordingly.
>

I've attached the rebased patch.  It looks like someone had already
fixed the framework library search issue, so this new patch only changes
the search for the include dirs.

Cheers,
 - David


0001-FindPythonLibs-Match-include-dir-to-library-version.patch
Description: Binary data
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-16 Thread David Gobbi
On Wed, Sep 16, 2015 at 9:41 AM, Brad King <brad.k...@kitware.com> wrote:

> On 09/16/2015 11:39 AM, Brad King wrote:
> > On 09/16/2015 10:00 AM, David Gobbi wrote:
> >> this new patch only changes the search for the include dirs.
> >
> > Thanks.  Rather than calling find_path twice, the first call could
> > just use HINTS instead of PATHS.  HINTS are meant for this use case:
> > searching paths detected from the system in some manner.  They are
> > searched before the generic system and environment paths.  Does that
> > work for your use case?
> >
> > Also, why does the second call not use the same list of suffixes?
>
> Meanwhile I split out the OS X framework path fix:
>
>  FindPythonLibs: Fix OS X framework include directory search path
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ea2db3bb
>
> Please check that it looks correct on its own.


Thanks, looks fine.  I've modified my patch so that it only calls find_path
once.
It uses HINTS to search for the includes in the same prefix as where the
library
was found, which is probably the best place to start.  I've left the
framework dirs
in PATHS because we don't necessarily want them to have priority, we just
want to have them in the search path.

 - David


0001-FindPythonLibs-Match-include-dir-to-library-version.patch
Description: Binary data
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

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

2015-09-15 Thread David Gobbi
Hi All,

I've attached three suggested patches for cmake.

The first is trivial, it simply adds Python 3.5 and 3.6 to the search list.

The second removes the long-deprecated PYTHON_INCLUDE_PATH as a suggestion
for PYTHON_INCLUDE_DIR.

The third does two important things: 1) it fixes bugs for searching for
specific versions of the libs and headers for framework installs of Python
on OS X, and 2) it doesn't search for the include directory until after
library has been found, so that it can use the library version to direct
the search for the include directory.

Any comments on these patches would be appreciated.

Cheers,
 - David


0001-Add-Python-3.6-3.5-to-the-versions-searched-for.patch
Description: Binary data


0002-Remove-PYTHON_INCLUDE_PATH-as-input-to-FindPythonLib.patch
Description: Binary data


0003-Match-python-include-dir-to-library-version.patch
Description: Binary data
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers