On Thursday 17 December 2015 11:12:13 Brad King wrote:
> On 12/16/2015 05:04 AM, Andreas Schneider wrote:
> > similar to what I implemented in FindPerlLibs.cmake some years ago, I've
> > added PYTHON_SITELIB to FindPythonLibs. With PYTHON_SITELIB you have the
> > location where to install the python modules you built with cmake.
> > 
> > Example:
> > 
> > find_package(PythonInterp)
> > find_package(PythonLibs)
> > 
> > python_add_module(my_py my_py.c)
> > install(TARGETS my_py DESTINATION
> > ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB})
> One of the goals of FindPythonLibs is to work when cross-compiling such
> that one cannot run the interpreter natively.  That is one reason we
> don't just ask the interpreter where to get the libraries.  There has
> been some discussion about doing such lookups conditionally when we
> can run the interpreter but also having a fallback.

If you look at the code, my changes to the code are inside an already existing

  if (PYTHON_EXECUTABLE)
  ...

So if you don't call find_package(PythonInterp) before 
find_package(PythonLibs) it will not get the PATH information for 
PYTHON_SITELIB.

The behavior of the module doesn't not change with this addition!

As it seems you did not look with enough context at the patch you can view the 
changes with more context (40 lines) here:

https://git.cryptomilk.org/users/asn/cmake.git/commit/?h=asn_pythonlibs&id=e414ea43caedeffeb27bb367b5f6c41e6238052a&context=40&ignorews=0&dt=0


Cheers,


        -- andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                a...@cryptomilk.org
-- 

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

Reply via email to