set(Python3_FIND_STRATEGY LOCATION)
find_package(Python REQUIRED COMPONENTS Interpreter Development NumPy)
find_package(pybind11 REQUIRED)
find_package(xtl REQUIRED)
find_package(xtensor REQUIRED)
find_package(xtensor-python REQUIRED)

pybind11_add_module(backend main.cpp proj.cpp)
target_link_libraries(backend PUBLIC cosy xtensor-python Python::NumPy)
if(COSY_PROJ)
  target_link_libraries(backend PUBLIC proj)
  target_compile_definitions(backend PUBLIC COSY_BUILD_PROJ)
endif()

set_target_properties(backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python/cosy")
