summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlex Merry <alex.merry@kde.org>2015-08-16 20:30:41 +0100
committerAlexandr Akulich <akulichalexander@gmail.com>2015-10-06 11:01:41 +0500
commit3716c048d65d4984513591cb8b1031858201db6c (patch)
treeae2ac1ba6bb2ea467a211575aea1eab18f4b3ff4 /CMakeLists.txt
parentec4a3d62b68a57254515f01fc5ea3325ffb1dbfb (diff)
Tell CMake what version of Python we want to find.
This ensures that Python 2 is found if possible, rather than Python 3. https://bugs.freedesktop.org/show_bug.cgi?id=91659 Reviewed-by: Alexandr Akulich <akulichalexander@gmail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9a014ce3..a01b586f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -133,8 +133,8 @@ macro_log_feature(QT_GLIB_SUPPORT "Qt Glib Support"
set(CMAKE_REQUIRED_FLAGS "")
# Find python version >= 2.5
-find_package(PythonLibrary REQUIRED)
set(REQUIRED_PY 2.5)
+find_package(PythonLibrary ${REQUIRED_PY} REQUIRED)
if(${PYTHON_SHORT_VERSION} VERSION_GREATER ${REQUIRED_PY} OR ${PYTHON_SHORT_VERSION} VERSION_EQUAL ${REQUIRED_PY})
message(STATUS "Python ${PYTHON_SHORT_VERSION} found")
else(${PYTHON_SHORT_VERSION} VERSION_GREATER ${REQUIRED_PY} OR ${PYTHON_SHORT_VERSION} VERSION_EQUAL ${REQUIRED_PY})