libigl-python-bindings
libigl-python-bindings copied to clipboard
cannot find embree/rtcore.h when writing python binding
Hello, I'm trying to write a binding for one of the function that uses the embree intersector. I added the embree folder to both ./external and ./external/libigl/external. When I run python setup.py develop, I still get the error
/Documents/projects/libigl-python-bindings/external/libigl/include/igl/embree/EmbreeIntersector.h:23:10: fatal error: embree3/rtcore.h: No such file or directory #include <embree3/rtcore.h>
I tried the following modification with CMakeLists.txt in the root directory, but none of them worked.
- Add
target_include_directories(pyigl_classes PRIVATE "${PYLIBIGL_EXTERNAL}/embree/include")
- Change option(LIBIGL_WITH_EMBREE "Use Embree" OFF) to ON
Much appreciated if someone can help to get rid of this error.
In addition to
option(LIBIGL_WITH_EMBREE "Use Embree" ON)
I believe you also need:
target_link_libraries(pyigl_classes PRIVATE npe igl::core igl::embree)
Are you sure option(LIBIGL_WITH_EMBREE "Use Embree" ON) is set to ON?
I believe this needs to appear in cmakelists.txt before any of the libigl related stuff.
(also try a clean build)
A clean build worked! Thank you so much.
Would love to start an igl.embree
module if you'd like to PR your function. Closing this issue as resolved.