blob: 0f9557d04ad73dc8aea7098ea5a03b1e7854a445 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
diff --git a/cmake/modules/FindBoostPython.cmake b/cmake/modules/FindBoostPython.cmake
index d6c5a34..1fde037 100644
--- a/cmake/modules/FindBoostPython.cmake
+++ b/cmake/modules/FindBoostPython.cmake
@@ -24,7 +24,7 @@ set(BOOST_PYTHON_INCLUDES)
set(BOOST_PYTHON_LIBS)
# handy arrays
-set(PYTHON_VERSIONS "python;python2.7;python2.6;python2.5;python2.4;python2.3;python2.2")
+execute_process(COMMAND python -c "import sys; sys.stdout.write('.'.join(str(x) for x in sys.version_info[:2]))" OUTPUT_VARIABLE PYTHON_VERSIONS)
# 1st: check for boost/shared_ptr.hpp
check_include_file_cxx(boost/shared_ptr.hpp HAVE_BOOST_SHARED_PTR_HPP)
@@ -35,7 +35,7 @@ if(HAVE_BOOST_SHARED_PTR_HPP)
set(_found FALSE)
foreach(_pyver ${PYTHON_VERSIONS})
if(NOT _found)
- pkg_check_modules(_python QUIET ${_pyver})
+ pkg_check_modules(_python python-${_pyver})
if (_python_FOUND)
find_package(Boost 1.33 COMPONENTS python)
if (Boost_PYTHON_FOUND)
|