cmake: Find the python executable and site libs
authorAndreas Schneider <asn@samba.org>
Wed, 16 Dec 2015 09:36:22 +0000 (10:36 +0100)
committerAndreas Schneider <asn@samba.org>
Fri, 8 Jan 2016 12:07:08 +0000 (13:07 +0100)
This is needed to find the PYTHON_SITELIB directory for module
installation.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
CMakeLists.txt

index 4743c6bfa0b65b217a70b29d9ec63b875b7d046c..8709a14cf9cd041c3c94c81276844f23fddc77a3 100644 (file)
@@ -45,8 +45,11 @@ macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source buil
 # Find out if we have threading available
 set(CMAKE_THREAD_PREFER_PTHREADS ON)
 find_package(Threads)
+
+find_package(PythonInterp)
 set(Python_ADDITIONAL_VERSIONS 2.6 2.7 3.3 3.4)
 find_package(PythonLibs)
+find_package(PythonSiteLibs)
 
 # config.h checks
 include(ConfigureChecks.cmake)