modify FindPythonPackage to use Python found
* modify FindPythonPackage to use Python found
Add find_package(PythonInter...) to the beginning of the file
(outside of the macro) so that cmake finds the Python 2.7 interpreter
and uses it when checking for existence of a module.
# FATAL_ERROR = CMake Error, stop processing and generation
#
+if (NOT PYTHON_EXECUTABLE)
+ find_package(PythonInterp 2.7 REQUIRED)
+endif (NOT PYTHON_EXECUTABLE)
+
macro(FIND_PYTHON_PKG PKG_NAME ERR_LEVEL )
- execute_process( COMMAND python -c "import ${PKG_NAME}" ERROR_QUIET RESULT_VARIABLE STATUS_FLAG)
+ execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import ${PKG_NAME}" ERROR_QUIET RESULT_VARIABLE STATUS_FLAG)
if(STATUS_FLAG)
message(${ERR_LEVEL} "PACKAGER depenency python ${PKG_NAME} package is missing!!!")
