sxyu / sdf

Parallelized triangle mesh --> continuous signed distance field on CPU
BSD 2-Clause "Simplified" License
436 stars 41 forks source link

Building Python Bindings #10

Closed ssav7912 closed 1 year ago

ssav7912 commented 1 year ago

Hi, I'm trying to chase down a segfault and am rebuilding this without optimisations & with debug symbols, however it seems the included Makefile & CMake config doesn't build the python bindings. I have pointed CMake to the pybind11 directory as CMakeLists.txt asks, but I'm not sure what comes next, it doesn't look like pybind.cpp is included in any of the target rules (or if that's what I should be looking at at all).

How do I build and link the python bindings?

Thanks.

ssav7912 commented 1 year ago

Figured it out, also needed to set the flag SDF_BUILD_PYTHON to true when calling CMake. This will generate a shared object that can go in your python environments site-packages directory.