add filters in python bindings

This commit is contained in:
AndreaRigoni
2026-03-05 15:03:19 +00:00
parent 42db99759f
commit 554eff9b55
8 changed files with 269 additions and 8 deletions

View File

@@ -4,10 +4,11 @@ set(SOURCES
module.cpp
core_bindings.cpp
math_bindings.cpp
math_filters_bindings.cpp
)
# Use pybind11 to add the python module
pybind11_add_module(uLib_python module.cpp core_bindings.cpp math_bindings.cpp)
pybind11_add_module(uLib_python module.cpp core_bindings.cpp math_bindings.cpp math_filters_bindings.cpp)
# Link against our C++ libraries
target_link_libraries(uLib_python PRIVATE
@@ -49,4 +50,9 @@ if(BUILD_TESTING)
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testing/math_pybind_test.py)
set_tests_properties(pybind_math PROPERTIES
ENVIRONMENT "PYTHONPATH=$<TARGET_FILE_DIR:uLib_python>:${PROJECT_SOURCE_DIR}/src/Python")
add_test(NAME pybind_math_filters
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/testing/math_filters_test.py)
set_tests_properties(pybind_math_filters PROPERTIES
ENVIRONMENT "PYTHONPATH=$<TARGET_FILE_DIR:uLib_python>:${PROJECT_SOURCE_DIR}/src/Python")
endif()