]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Search python libraries with same version as python interpreter version
authorrnv <rnv@opencascade.com>
Thu, 17 Mar 2016 13:15:19 +0000 (16:15 +0300)
committerrnv <rnv@opencascade.com>
Thu, 17 Mar 2016 13:15:19 +0000 (16:15 +0300)
salome_adm/cmake_files/FindSalomePythonLibs.cmake

index c2e6d58bd9ce177257f7df81c732ecc7d7dce135..06e87aae5a94304f5393bae0cb9ab604c95618c6 100644 (file)
@@ -31,6 +31,10 @@ IF(EXISTS "${PYTHON_ROOT_DIR}" AND (NOT PYTHONLIBS_ROOT_DIR))
   MESSAGE(STATUS "Setting PYTHONLIBS_ROOT_DIR to: ${PYTHON_ROOT_DIR}")
   SET(PYTHONLIBS_ROOT_DIR "${PYTHON_ROOT_DIR}" CACHE PATH "Path to PythonLibs directory")
 ENDIF()
+IF (SALOMEPYTHONINTERP_FOUND AND NOT "${PYTHON_VERSION_STRING}" STREQUAL "") 
+   # Trying to search libraries with same version as an interpreter version
+   SET(PythonLibs_FIND_VERSION ${PYTHON_VERSION_STRING})
+ENDIF()
 SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(PythonLibs PYTHON_INCLUDE_DIR 2)
 
 IF(SALOMEPYTHONLIBS_FOUND)