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})