[vtk-developers] VTK Python & BUILD_SHARED_LIBS=OFF
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Sun Sep 9 08:36:18 EDT 2018
Burlen,
You're correct an all accounts. That's indeed an issue. I am not sure
what's the best way: should we install the header and export the
libraries, or create a new library/api that dependent projects can
call to init the static Python modules or something even more
creative. If we go the truly modular route, CMakeLoadAllPythonModules
is an anathema. It inits all modules that VTK was built with and not
the only the modules that the app depends on. Ideally, it'd be the
latter. Not sure how we could do that. Ben/David, any ideas?
Utkarsh
On Sat, Sep 8, 2018 at 2:09 PM Burlen Loring <burlen.loring at gmail.com> wrote:
>
> Hi Folks,
>
> I'm using VTK in an embedded Python interpreter. In my case VTK is an external project dependency, and to configure my library I point to an externally installed VTK. Works great when I compile VTK with BUILD_SHARED_LIBS=ON, but with this set OFF I can't "import vtk". Some of the Python modules are not found. Since vtkpython works, I know there is a way. If I understand correctly I need to have the following before I initialize the interpreter.
>
> #include "vtkpythonmodules.h"
>
> CMakeLoadAllPythonModules();
>
> I'm stuck on the CMake code to locate the header and link dependencies. how do I locate the include directory of vtkpythonmodules.h? the file is not installed, which seems to be a problem. Then also how can I access the list of link libraries needed? These seem to be stored in an internal variable, but are they exported to the install?
>
> Burlen
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtk-developers
>
More information about the vtk-developers
mailing list