0

I am using Hunter to manage dependencies of my project. One of them is pybind11 It has been installed correctly and I can use it in my code. However when building my project with CMake I need to use some cmake function provided by pybind11 in some cmake files. These are located in pybind11_DIR How can I include them ?

Before I was used to only do that add_subdirectory(pybind11) to have everything included.

Thanks

EntrustName
  • 421
  • 6
  • 19
  • 1
    After the `hunter_add_package(pybind11)` and `find_package(pybind11)`, just use the `pybind11_add_module(...)` function; it works. – Justin Sep 16 '18 at 05:29
  • indeed... thx. If I want to use `target_link_directories` with `pybind11_add_module` how can i do that ? – EntrustName Sep 16 '18 at 05:48
  • See [the documentation](https://pybind11.readthedocs.io/en/stable/compiling.html#pybind11-add-module) – Justin Sep 16 '18 at 05:55

0 Answers0