ENDIF()
# 6. Specifics
+
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy ; import sys ; sys.stdout.write(numpy.get_include())" OUTPUT_VARIABLE NUMPY_INCLUDE_DIR ERROR_QUIET )
+ IF(NUMPY_INCLUDE_DIR)
+ SET(NUMPY_FOUND TRUE)
+ ENDIF(NUMPY_INCLUDE_DIR)
+ IF(NUMPY_FOUND)
+ SET(PYTHON_INCLUDE_DIRS ${NUMPY_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS})
+ SET(PYTHON_DEFINITIONS "${PYTHON_DEFINITIONS} -DWITH_NUMPY")
+ MESSAGE(STATUS "numpy found : ${NUMPY_INCLUDE_DIR}")
+ ELSE(NUMPY_FOUND)
+ MESSAGE(STATUS "numpy not found")
+ ENDIF(NUMPY_FOUND)
+
## None here
ELSE()
MESSAGE(STATUS "Python was only partially (or not at all) found .")
SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-IF(NUMPY_STATUS)
+IF(NUMPY_FOUND)
SET(SWIG_MODULE_MEDCalculator_EXTRA_FLAGS -DWITH_NUMPY)
-ENDIF(NUMPY_STATUS)
+ENDIF(NUMPY_FOUND)
SWIG_ADD_MODULE(MEDCalculator python MEDCalculator.i)
SWIG_LINK_LIBRARIES(MEDCalculator ${PYTHON_LIBS} medcalculator)
SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-IF(NUMPY_STATUS)
+IF(NUMPY_FOUND)
SET(SWIG_MODULE_MEDCouplingCorba_EXTRA_FLAGS -DWITH_NUMPY)
-ENDIF(NUMPY_STATUS)
+ENDIF(NUMPY_FOUND)
SET(MEDCouplingCorba_SWIG_DPYS_FILES
MEDCouplingCorbaTypemaps.i)
SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-IF(NUMPY_STATUS)
+IF(NUMPY_FOUND)
SET(SWIG_MODULE_MEDCoupling_EXTRA_FLAGS -DWITH_NUMPY)
-ENDIF(NUMPY_STATUS)
+ENDIF(NUMPY_FOUND)
SET (MEDCoupling_SWIG_DPYS_FILES
MEDCouplingCommon.i