add_cython_target(cpyssht_sources cpyssht.pyx C PY3)
add_cython_target(ducc0_sources ducc_interface.pyx C PY3)
add_library(cpyssht MODULE ${cpyssht_sources})
add_library(ducc_interface MODULE ${ducc0_sources})
python_extension_module(cpyssht)
python_extension_module(ducc_interface)
target_link_libraries(cpyssht ssht)
target_include_directories(cpyssht PUBLIC "${PROJECT_SOURCE_DIR}/src/c"
                                          ${NumPy_INCLUDE_DIRS})
target_include_directories(ducc_interface PUBLIC ${NumPy_INCLUDE_DIRS})
if(WIN32)
    target_compile_definitions(cpyssht PUBLIC MS_WIN64)
    target_compile_definitions(ducc_interface PUBLIC MS_WIN64)
endif()
install(TARGETS cpyssht ducc_interface LIBRARY DESTINATION src/pyssht)
