Pybind11 CMakeLists #4530
petrasvestartas
started this conversation in
Show and tell
Replies: 1 comment
-
Thanks for helper! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I wish there would be more examples files on documentation. Specially for CMake. Here is one, made with some trial and errors.
Hopefully this will save somebody some time of work. If you see better approaches please let me know.
I am using Windows 10.
CMake
Pybind11 can be downloaded using this command directly in CMake:
The pybind11 needs to be configured like this, pay a special attention to how Python is found and pybind11_add_module function:
C++
compas_wood.cpp file
compas_wood.h file
Python
python file (I had to add a directory where the "wood_pybind11.cp38-win_amd64.pyd" is and tested the basic function ):
Output
🍻🍻🍻
Beta Was this translation helpful? Give feedback.
All reactions