[cmake-developers] [PATCH] Get the PYTHON_SITELIB directory in FindPythonLibs

Brad King brad.king at kitware.com
Thu Dec 17 13:25:54 EST 2015


On 12/17/2015 11:39 AM, Andreas Schneider wrote:
> 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.

Sure, but if PYTHON_EXECUTABLE is set to refer to a binary that cannot
run on the host because it is part of a cross-compiling SDK then this
won't work.  Or, if PYTHON_EXECUTABLE can run on the host but it is
not the executable that corresponds to the libraries because the libs
are for another architecture then it will give wrong information.

-Brad



More information about the cmake-developers mailing list