diff --git a/CMakeLists.txt b/CMakeLists.txt index b8ee37a..6c4d948 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,18 +16,19 @@ find_package(nanobind CONFIG REQUIRED) nanobind_add_module(pgeof_ext NOMINSIZE STABLE_ABI LTO src/pgeof_ext.cpp) -# for nanobind 2 -# nanobind_add_stub( -# pgeof_ext_stub -# MODULE pgeof_ext -# OUTPUT pgeof_ext.pyi -# PYTHON_PATH $ -# DEPENDS pgeof_ext -# ) +nanobind_add_stub( + pgeof_ext_stub + MODULE pgeof_ext + OUTPUT pgeof_ext.pyi + MARKER_FILE py.typed + PYTHON_PATH $ + DEPENDS pgeof_ext +) # All lib are headeer only. # it's faster to include like this than using exported targets # (i.e add_subdirectories(...)) target_include_directories(pgeof_ext PRIVATE "include" "third_party/eigen" "third_party/nanoflann/include" "third_party/taskflow") -install(TARGETS pgeof_ext LIBRARY DESTINATION pgeof) \ No newline at end of file +install(TARGETS pgeof_ext LIBRARY DESTINATION pgeof) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pgeof_ext.pyi ${CMAKE_CURRENT_BINARY_DIR}/py.typed DESTINATION pgeof) \ No newline at end of file