From: Boris Ranto Date: Thu, 4 Apr 2019 20:00:55 +0000 (+0200) Subject: cmake: check for MAJOR.MINOR version of python3 X-Git-Tag: v14.2.1~43^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8d65bc74ce224633f86fac2a33b0f522b6868995;p=ceph.git cmake: check for MAJOR.MINOR version of python3 We can only check for MAJOR.MINOR version of python3 since FindPython3Libs does not support checking for MAJOR.MINOR.PATCH version of python3. We also need to make sure we use the PYTHON3 versions of these variables. This should fix a regression introduced by c961e00. Signed-off-by: Boris Ranto (cherry picked from commit 8b3f0d5bcce8a5c8ddff0a362fbccb05d18335f6) --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 69ac1c761f2b..fb32c9e42df7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -229,7 +229,7 @@ if(WITH_PYTHON3) set(WITH_PYTHON3 "3") endif() find_package(Python3Interp ${WITH_PYTHON3} REQUIRED) - find_package(Python3Libs ${PYTHON_VERSION_STRING} REQUIRED) + find_package(Python3Libs ${PYTHON3_VERSION_MAJOR}.${PYTHON3_VERSION_MINOR} REQUIRED) endif() # the major version of the python bindings as a dependency of other