diff --git a/CMake/FindNumpy.cmake b/CMake/FindNumpy.cmake index 006ca7ce9a..057833cc31 100644 --- a/CMake/FindNumpy.cmake +++ b/CMake/FindNumpy.cmake @@ -1,29 +1,32 @@ # Variables set by this script # NUMPY_FOUND # NUMPY_INCLUDE_DIR find_package(PackageHandleStandardArgs) if(DEFINED Numpy_DIR AND EXISTS ${Numpy_DIR}) - set(NUMPY_INCLUDE_DIR ${Numpy_DIR}/core/include + set(NUMPY_INCLUDE_DIR ${Numpy_DIR}/core/include) + MESSAGE("NUMPY_DIR: " ${Numpy_DIR}) + MESSAGE("NUMPY_INCLUDE_DIR: " ${NUMPY_INCLUDE_DIR}) + MESSAGE("PYTHON_EXECUTABLE: " ${PYTHON_EXECUTABLE}) else() set(_python ${PYTHON_EXECUTABLE}) if(UNIX) STRING(REPLACE " " "\ " _python ${PYTHON_EXECUTABLE}) endif() execute_process ( COMMAND ${_python} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]" OUTPUT_VARIABLE output OUTPUT_STRIP_TRAILING_WHITESPACE ) if(DEFINED output AND EXISTS ${output} ) set (NUMPY_INCLUDE_DIR ${output}) endif() endif() FIND_PACKAGE_HANDLE_STANDARD_ARGS(Numpy DEFAULT_MSG NUMPY_INCLUDE_DIR) MARK_AS_ADVANCED ( NUMPY_INCLUDE_DIR ) diff --git a/CMake/PackageDepends/MITK_Numpy_Config.cmake b/CMake/PackageDepends/MITK_Numpy_Config.cmake index 2e2e10da27..d10c0eaa78 100644 --- a/CMake/PackageDepends/MITK_Numpy_Config.cmake +++ b/CMake/PackageDepends/MITK_Numpy_Config.cmake @@ -1,6 +1,4 @@ if(MITK_USE_Python) find_package(Numpy REQUIRED) list(APPEND ALL_INCLUDE_DIRECTORIES ${NUMPY_INCLUDE_DIR}) - MESSAGE("NUMPY_INCLUDE_DIR: " ${NUMPY_INCLUDE_DIR}) - MESSAGE("PYTHON_EXECUTABLE: " ${PYTHON_EXECUTABLE}) endif()