cmake_policy(SET CMP0057 NEW)
find_package(Python COMPONENTS Interpreter Development)

find_package(pybind11)

find_package( Eigen3 REQUIRED )
include_directories(${EIGEN3_INCLUDE_DIR})


if (Python_Development_FOUND AND pybind11_FOUND)
    pybind11_add_module(pymnnd pymnnd.cpp)
    
    include_directories(../include)
    
    message("Python at: ${Python_EXECUTABLE}")
if (Python_Interpreter_FOUND)
    add_test(NAME pytest-heap COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/pytest_heap.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
set_tests_properties(pytest-heap PROPERTIES
    ENVIRONMENT PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:$ENV{PYTHONPATH})
endif(Python_Interpreter_FOUND)

endif(Python_Development_FOUND AND pybind11_FOUND)
