Skip to content

Hardcoded path to pybind11 in Plugin target #225

@jnbrunet

Description

@jnbrunet

When linking the Plugin cmake target from an installed SofaPython3 (i.e. downloaded zip on SOFA website) to our cmake target (for ex, caribou), the following error happen:

CMake Error in src/SofaCaribou/Python/CMakeLists.txt:
  Imported target "SofaPython3::Bindings.Sofa.Core" includes non-existent
  path

    "C:/pybind11/2.4.3/install/include"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.

Indeed, looking into the installed cmake files of SofaPython3, we find this in lib/cmake/SofaPython3/PluginTargets.cmake:

set_target_properties(SofaPython3::Plugin PROPERTIES
  INTERFACE_COMPILE_DEFINITIONS "HAVE_SNPRINTF"
  INTERFACE_INCLUDE_DIRECTORIES "C:/pybind11/2.4.3/install/include;${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "Sofa.Core;Sofa.DefaultType;Sofa.SimulationCore;SofaSimulationGraph;Sofa.Helper;pybind11::module;pybind11::embed"
)

which uses an hardcoded path to pybind11 v2.4.3. I suppose this is where pybind11 was installed on the machine that created the SOFA package.

Metadata

Metadata

Assignees

Labels

issue: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions