ENDIF (BUILD_LOCAL_SUBMISSION)
IF (BUILD_PYTHON_WRAPPING)
FIND_PACKAGE(PythonInterp)
- SET(PythonLibs_FIND_VERSION ${PYTHON_VERSION_STRING})
- FIND_PACKAGE(PythonLibs)
+ IF (PYTHONINTERP_FOUND)
+ get_filename_component(PYTHON_BIN_DIR "${PYTHON_EXECUTABLE}" PATH)
+ get_filename_component(CMAKE_INCLUDE_PATH "${PYTHON_BIN_DIR}/../include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" ABSOLUTE)
+ get_filename_component(CMAKE_LIBRARY_PATH "${PYTHON_BIN_DIR}/../lib" ABSOLUTE)
+ ENDIF (PYTHONINTERP_FOUND)
+ FIND_PACKAGE(PythonLibs ${PYTHON_VERSION_STRING} EXACT)
FIND_PACKAGE(SWIG)
ENDIF (BUILD_PYTHON_WRAPPING)