]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Add CACHE keyword to put 'PYTHON_INCLUDE_DIR' and 'PYTHON_LIBRARY' variables into...
authorakl <akl@opencascade.com>
Tue, 4 Jun 2013 13:32:18 +0000 (13:32 +0000)
committerakl <akl@opencascade.com>
Tue, 4 Jun 2013 13:32:18 +0000 (13:32 +0000)
salome_adm/cmake_files/FindSalomePYTHON.cmake

index a75238b41a56dc991e7983cfac8cf5f202a121ef..313832ff00df825e19799f1da67d3659cdb207cd 100644 (file)
@@ -27,8 +27,8 @@ if(EXISTS ${PYTHON_ROOT_DIR})
 endif(EXISTS ${PYTHON_ROOT_DIR})
 find_package(PythonInterp REQUIRED)
 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})
+  set(PYTHON_INCLUDE_DIR ${PYTHON_ROOT_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} CACHE PATH "Path to directory where Python.h is found" FORCE)
+  set(PYTHON_LIBRARY ${PYTHON_ROOT_DIR}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}${CMAKE_SHARED_LIBRARY_SUFFIX} CACHE FILEPATH "Python library path" FORCE)
 endif(EXISTS ${PYTHON_ROOT_DIR})
 find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED)
 MESSAGE("Python includes : " ${PYTHON_INCLUDE_DIR})