]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
More proper specification of version for Python libs
authorbarate <barate>
Fri, 22 Mar 2013 09:53:13 +0000 (09:53 +0000)
committerbarate <barate>
Fri, 22 Mar 2013 09:53:13 +0000 (09:53 +0000)
salome_adm/cmake_files/FindSalomePYTHON.cmake

index 31c57d65e0fa016e3041b482490901323bb0c13d..2578151fb216b1376acb0db7d57efc7c9302cd4c 100644 (file)
@@ -8,13 +8,11 @@ if(EXISTS ${PYTHON_ROOT_DIR})
   set(CMAKE_PROGRAM_PATH ${PYTHON_ROOT_DIR}/bin)
 endif(EXISTS ${PYTHON_ROOT_DIR})
 find_package(PythonInterp REQUIRED)
-# Set PythonLibs_FIND_VERSION To avoid problems when several versions are in the system
-SET(PythonLibs_FIND_VERSION ${PYTHON_VERSION_STRING})
 if(EXISTS ${PYTHON_ROOT_DIR})
   set(PYTHON_INCLUDE_DIR ${PYTHON_ROOT_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
   set(PYTHON_LIBRARY ${PYTHON_ROOT_DIR}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}${CMAKE_SHARED_LIBRARY_SUFFIX})
 endif(EXISTS ${PYTHON_ROOT_DIR})
-find_package(PythonLibs REQUIRED)
+find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED)
 MESSAGE("Python includes : " ${PYTHON_INCLUDE_DIR})
 MESSAGE("Python library  : " ${PYTHON_LIBRARY})
 MESSAGE("Python binary   : " ${PYTHON_EXECUTABLE})