From: akl Date: Tue, 4 Jun 2013 13:32:18 +0000 (+0000) Subject: Add CACHE keyword to put 'PYTHON_INCLUDE_DIR' and 'PYTHON_LIBRARY' variables into... X-Git-Tag: B4KillOfAutomake~57 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1a06106236420cc0df4b4ec85f8f6acb3af64cc4;p=modules%2Fkernel.git Add CACHE keyword to put 'PYTHON_INCLUDE_DIR' and 'PYTHON_LIBRARY' variables into cache file. --- diff --git a/salome_adm/cmake_files/FindSalomePYTHON.cmake b/salome_adm/cmake_files/FindSalomePYTHON.cmake index a75238b41..313832ff0 100644 --- a/salome_adm/cmake_files/FindSalomePYTHON.cmake +++ b/salome_adm/cmake_files/FindSalomePYTHON.cmake @@ -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})