1 # Variables set by this script
4 find_package(PackageHandleStandardArgs)
6 # search for the runtime if it's not already set
7 if( NOT DEFINED PYTHON_EXECUTABLE )
8 FIND_PACKAGE(PythonLibs REQUIRED)
9 FIND_PACKAGE(PythonInterp REQUIRED)
12 set(_python ${PYTHON_EXECUTABLE})
14 STRING(REPLACE " " "\ " _python ${PYTHON_EXECUTABLE})
18 COMMAND ${_python} -c
"import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]"
19 OUTPUT_VARIABLE output
20 OUTPUT_STRIP_TRAILING_WHITESPACE
23 if(DEFINED output AND EXISTS ${output} )
24 set (NUMPY_INCLUDE_DIR ${output})
27 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Numpy DEFAULT_MSG NUMPY_INCLUDE_DIR)